________________________________________________________________________

This file is part of Logtalk <http://logtalk.org/>  

Logtalk is free software. You can redistribute it and/or modify it under
the terms of the FSF GNU General Public License 3  (plus some additional
terms per section 7).        Consult the `LICENSE.txt` file for details.
________________________________________________________________________


% start by loading the example by choosing one of the loader files
% (you must quit and restart Logtalk for each testing scenario):


% run benchmarks with event support turned on and without using static binding:

| ?- logtalk_load(benchmarks(loader_events)).
...


% run benchmarks with event support turned off and without using static binding:

| ?- logtalk_load(benchmarks(loader_no_events)).
...


% run benchmarks with event support turned off and using static binding:

| ?- logtalk_load(benchmarks(loader_static_binding)).
...


% list all the benchmark tests:

| ?- benchmarks::benchmark(Id, Goal).

Goal = my_length([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],_)
Id = s1 ? ;

Goal = object::length([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],_)
Id = s2 ? ;

Goal = my_nrev([0, 1, 2, 3, 4, 5, 6, 7|...], _G33)
Id = s3 ? ;

Goal = object::nrev([0, 1, 2, 3, 4, 5, 6|...], _G36)
Id = s4 ? ;

Goal = leaf::obj_local
Id = c1 ? ;

Goal = leaf::ctg_direct
Id = c2 ? ;

Goal = leaf::ctg_self
Id = c3 ? ;

Goal = create_object(xpto,[],[],[]),abolish_object(xpto)
Id = d1 ? ;

Goal = plain_dyndb
Id = d2 ? ;

Goal = database::this_dyndb
Id = d3 ? ;

Goal = database::self_dyndb
Id = d4 ? ;

Goal = database::other_dyndb
Id = d5

yes


% run all the benchmark tests the default number of times:

| ?- benchmarks::run.
...


% or run specific sets of benchmark tests, for example:

| ?- benchmarks::run(s11, 1000000), benchmarks::run(s12, 1000000), benchmarks::run(s13, 1000000).
...

| ?- benchmarks::run(s21, 1000000), benchmarks::run(s22, 1000000), benchmarks::run(s23, 1000000).
...

| ?- benchmarks::run(s31, 1000000), benchmarks::run(s32, 1000000), benchmarks::run(s33, 1000000).
...
