Author(s): David Trallero Mena.
Version: 1.10#7 (2006/4/26, 19:22:13 CEST)
Version of last change: 1.0#2 (2003/12/3, 0:10:32 CET)
This library has been done for measuring or compare execution features (currently only time) of predicates. This module relies on gnuplot, an auxiliary module which use the tool gnuplot, for representing results graphically
time_analyzer)time_analyzer)
Meta-predicate with arguments: performance(goal,?,?).
Usage: performance(P, M, Times)
P, as a first argument. The aim of this predicate is to call P several times and meassure some feature (in this version, only time, that is because no extra parameter has been added). M defines how many times P should be called. Usually, calling the predicate in some succesion (10,100,1000) and dividing by the number of times it is executed we can obtain the "execution time" of the predicate (if we are measuring time).
The result of executions are returned in the list Times
The diferent modes are:
P is called Start times on the first time, Start+Increment on the second, etc.
P is called Start times on the first time, Start*Exp on the second, etc.
P is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1)
M is any term.
(basic_props:term/1)
Times is a free variable.
(term_typing:var/1)
P is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1)
M is any term.
(basic_props:term/1)
Times is a list of nums.
(basic_props:list/2)
Usage: benchmark(P, BenchList, NumTimes, Method, Reserved, OutList)
P, which accepts ONE argument, is called with the first member of each pair of the BenchList list NumTimes. The entry list have pairs because the second member of the pair express the meaning of the first one in the X-Axis. For example, if we are doing a benchmark of qsort function, the first member will be a list for being ordered and the second one will be the length of the unordered list. The output is a list of (X,Y) points where Y means the time needed for its entry of "cost" X. OutList can be used as TimeList in predicate generate_plot. Reserved is reserved for future implementations (it will take the value of runtime, memory_used...)
P is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1)
BenchList is a list of pairs.
(basic_props:list/2)
NumTimes is an integer.
(basic_props:int/1)
time_analyzer:average_mode(Method)
(time_analyzer:average_mode/1)
Reserved is any term.
(basic_props:term/1)
OutList is a free variable.
(term_typing:var/1)
P is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1)
BenchList is a list of pairs.
(basic_props:list/2)
NumTimes is an integer.
(basic_props:int/1)
time_analyzer:average_mode(Method)
(time_analyzer:average_mode/1)
Reserved is any term.
(basic_props:term/1)
OutList is a list of pairs.
(basic_props:list/2)
Usage: compare_benchmark(ListPred, BenchList, Method, NumTimes, BaseName, Reserved, GeneralOptions)
benchmark/6 with several predicates.
benchmark/6 predicate is called with each predicate in ListPred, and BaseName is used for the temporaries basename file. GeneralOptions are aplied to the plot
ListPred is a list of preds.
(basic_props:list/2)
BenchList is a list.
(basic_props:list/1)
time_analyzer:average_mode(Method)
(time_analyzer:average_mode/1)
NumTimes is an integer.
(basic_props:int/1)
BaseName is currently instantiated to an atom.
(term_typing:atom/1)
Reserved is any term.
(basic_props:term/1)
GeneralOptions is a free variable.
(term_typing:var/1)
ListPred is a list of preds.
(basic_props:list/2)
BenchList is a list.
(basic_props:list/1)
time_analyzer:average_mode(Method)
(time_analyzer:average_mode/1)
NumTimes is an integer.
(basic_props:int/1)
BaseName is currently instantiated to an atom.
(term_typing:atom/1)
Reserved is any term.
(basic_props:term/1)
GeneralOptions is a list.
(basic_props:list/1)
Usage: benchmark2(P, BenchList, Method, NumTimes, What, OutList)
P, which accepts TWO arguments, is called NumTimes with the first member of each pair of the BenchList list and a free variable as the second. The time of execution (in the future, the desired featured for be measured) is expected to be the second argument, that is because it is a variable. The entry list, BenchList have pairs because the second member of the pair express the cost of the first (in X-Axis). For example, if we are doing a benchmark of qsort function, the first member will be a list for being ordered and the second one will represent the lenght of the unordered list. The output is a list of (X,Y) points where Y express the time needed for they entry of "cost" X. OutList can be used as TimeList in predicate generate_plot. What is reserved for future use
P is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1)
BenchList is a list of pairs.
(basic_props:list/2)
time_analyzer:average_mode(Method)
(time_analyzer:average_mode/1)
NumTimes is an integer.
(basic_props:int/1)
What is currently instantiated to an atom.
(term_typing:atom/1)
OutList is a free variable.
(term_typing:var/1)
P is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1)
BenchList is a list of pairs.
(basic_props:list/2)
time_analyzer:average_mode(Method)
(time_analyzer:average_mode/1)
NumTimes is an integer.
(basic_props:int/1)
What is currently instantiated to an atom.
(term_typing:atom/1)
OutList is a list of pairs.
(basic_props:list/2)
Usage: compare_benchmark2(ListPred, BenchList, Method, NumTimes, BaseName, Reserved, GeneralOptions)
benchmark2/6 with several predicates.
benchmark2/6 is called with each predicate in ListPred and BaseName is used for the temporaries basename file. GeneralOptions are applied to the plot ('default' can be used for default General options)
ListPred is a list of preds.
(basic_props:list/2)
BenchList is a list.
(basic_props:list/1)
time_analyzer:average_mode(Method)
(time_analyzer:average_mode/1)
NumTimes is an integer.
(basic_props:int/1)
BaseName is currently instantiated to an atom.
(term_typing:atom/1)
Reserved is currently instantiated to an atom.
(term_typing:atom/1)
GeneralOptions is a list.
(basic_props:list/1)
ListPred is a list of preds.
(basic_props:list/2)
BenchList is a list.
(basic_props:list/1)
time_analyzer:average_mode(Method)
(time_analyzer:average_mode/1)
NumTimes is an integer.
(basic_props:int/1)
BaseName is currently instantiated to an atom.
(term_typing:atom/1)
Reserved is currently instantiated to an atom.
(term_typing:atom/1)
GeneralOptions is a list.
(basic_props:list/1)
Usage: sub_times(A, B, C)
A is a list of pairs.
(basic_props:list/2)
B is a list of pairs.
(basic_props:list/2)
C is a list of pairs.
(basic_props:list/2)
Usage: div_times(A, B)
A is a list of pairs (P1,P2). B is a list of pairs with the form (P1,P2/P1) for each (P1,P2) that belongs to A
A is a list of pairs.
(basic_props:list/2)
B is a list of pairs.
(basic_props:list/2)
Meta-predicate with arguments: cost(goal,?,?).
Usage: cost(A, T, What)
T is the expected measured feature. What is reserved for future implementations, just put 'runtime'
A is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1)
T is an integer.
(basic_props:int/1)
What is any term.
(basic_props:term/1)
Imported from
gnuplot (see the corresponding documentation for details).
Imported from
gnuplot (see the corresponding documentation for details).
Imported from
gnuplot (see the corresponding documentation for details).
Imported from
gnuplot (see the corresponding documentation for details).
Go to the first, previous, next, last section, table of contents.