This is the trivial-benchmark Reference Manual, version 3.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Fri May 15 13:08:02 2026 GMT+0.
The main system appears first, followed by any subsystem dependency.
trivial-benchmarkAn easy to use benchmarking system.
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://shinmera.com/project/trivial-benchmark.git)
zlib
3.0.0
documentation-utils (system).
package.lisp (file).
toolkit.lisp (file).
sampler.lisp (file).
timer.lisp (file).
documentation.lisp (file).
Files are sorted by type and then listed depth-first from the systems components trees.
trivial-benchmark/trivial-benchmark.asdtrivial-benchmark/package.lisptrivial-benchmark/toolkit.lisptrivial-benchmark/sampler.lisptrivial-benchmark/timer.lisptrivial-benchmark/documentation.lisptrivial-benchmark/trivial-benchmark.asdtrivial-benchmark (system).
trivial-benchmark/toolkit.lisppackage.lisp (file).
trivial-benchmark (system).
add-nickname (function).
print-table (function).
trivial-benchmark/sampler.lisptoolkit.lisp (file).
trivial-benchmark (system).
*default-samplers* (special variable).
bytes-consed (class).
commit-samples-form (generic function).
cycle-counter (class).
define-delta-sampler (macro).
define-sampler (macro).
eval-calls (class).
gc-run-time (class).
real-time (class).
run-time (class).
sampler (class).
sb-time (class).
system-info (class).
variables (generic reader).
wrap-measurement-form (generic function).
normalize-varspec (function).
trivial-benchmark/timer.lispsampler.lisp (file).
trivial-benchmark (system).
*default-computations* (special variable).
*default-metrics* (special variable).
compute (generic function).
describe-object (method).
format-timer-stats (function).
metric-types (generic function).
print-object (method).
report (function).
report-to (generic function).
reset (generic function).
samples (generic function).
timer (class).
with-sampling (macro).
with-timing (macro).
metrics (reader method).
(setf metrics) (writer method).
trivial-benchmark/documentation.lisptimer.lisp (file).
trivial-benchmark (system).
Packages are listed by definition order.
org.shirakumo.trivial-benchmarkcommon-lisp.
*default-computations* (special variable).
*default-metrics* (special variable).
*default-samplers* (special variable).
add-nickname (function).
bytes-consed (class).
commit-samples-form (generic function).
compute (generic function).
cycle-counter (class).
define-delta-sampler (macro).
define-sampler (macro).
eval-calls (class).
format-timer-stats (function).
gc-run-time (class).
metric-types (generic function).
print-table (function).
real-time (class).
report (function).
report-to (generic function).
reset (generic function).
run-time (class).
sampler (class).
samples (generic function).
sb-time (class).
system-info (class).
timer (class).
variables (generic reader).
with-sampling (macro).
with-timing (macro).
wrap-measurement-form (generic function).
enlist (function).
metrics (generic reader).
(setf metrics) (generic writer).
normalize-varspec (function).
round-to (function).
unlist (function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Which computations to make by default.
See COMPUTE
Which metrics to include by default.
If NIL, all sampled metrics are included.
See FORMAT-TIMER-STATS
Which sampler types to use by default.
See SAMPLER
See WITH-SAMPLING
Convenience macro to define a sampler type with a single delta metric.
NAME can either be the name of the sampler, or a list of the name and
a normalisation factor by which the delta is divided to convert it to
a proper sample point.
SAMPLE-POINT-FORMS should be one or more forms whose ultimate return
value evaluates to some REAL number. The forms are emitted *twice*,
the first time before the execution to be measured, and the second
time after. The sample is computed based on the difference of the two
return values.
See DEFINE-SAMPLER
See SAMPLER (type)
Convenience macro to define a new sampler type.
NAME should be the name of the new sampler class.
VARS should be a list of variable specs that the sampler will use to
store data during a sampling step. Each spec can be either a symbol
naming the variable, or a variable spec list.
FORMS should match the following structures:
(:MEASURE (FORM-VAR) BODY...)
(:COMMIT (COMMIT-FN-VAR) BODY...)
Which are converted to methods for WRAP-MEASUREMENT-FORM and
COMMIT-SAMPLES-FORM respectively. Every variable in VARS is bound
during the body of either, so that you can conveniently emit it into
the resulting forms.
See VARIABLES
See WRAP-MEASUREMENT-FORM
See COMMIT-SAMPLES-FORM
See SAMPLER (type)
See DEFINE-DELTA-SAMPLER
Records sampling information about FORMS into a timer.
TIMER-FORM should evaluate to a TIMER instance, into which the
sampling data will be committed.
SAMPLERS should be a list of names of SAMPLER types that will measure
the FORMS. If none are given, *DEFAULT-SAMPLERS* are used.
The values of FORMS are returned.
During expansion of this macro each sampler in SAMPLERS is
instantiated and variable bindings according to their VARIABLES specs
are emitted. Then, the FORMS are wrapped according to each sampler’s
WRAP-MEASUREMENT-FORM return value. The order here can matter, and the
first sampler specified will be the "innermost" wrapper. Finally,
each sampler’s COMMIT-SAMPLES-FORM is emitted in order to record the
sampling data into the timer.
See *DEFAULT-SAMPLERS*
See SAMPLER (type)
See TIMER (type)
See VARIABLES
See WRAP-MEASUREMENT-FORM
See COMMIT-SAMPLES-FORM
Convenience macro to do a one-off timing.
Creates a timer instance according to TIMER, runs WITH-SAMPLING N times, and then REPORTs the timer using the additional REPORT-ARGS.
SAMPLERS argument is evaluated during compile time and can be a list
or a name of a global variable holding a list of symbols.
See TIMER (type)
See WITH-SAMPLING
See REPORT
Adds the nikcnames TRIVIAL-BENCHMARK and TB to the package.
This is for convenience.
Print a table of the samples contained in the timer.
STREAM should be a stream to print to.
TIMER should be a TIMER instance.
COMPUTATIONS should be the derived statistical properties to compute
METRICS should be the metrics to include. If NIL, uses all metrics the
timer recorded samples for.
Other arguments are passed on to PRINT-TABLE
See TIMER (type)
See PRINT-TABLE
See *DEFAULT-COMPUTATIONS*
see *DEFAULT-METRICS*
Print a table of values
TABLE should be a list of lists in row-major order. Each row must have
the same number of elements.
STREAM is the stream to print the table to.
PADDING is the amount of space to insert to the left and right of
every cell.
FORMAT is the format to print the table in. Can be one of:
:PRINC — justs PRINCs the table instead
:MINIMAL — prints the table as small as it can
:FANCY — prints the table with box drawing glyphs
Prints a report on the given thing.
This is a wrapper around REPORT-TO.
See REPORT-TO
Emit a form to commit measured samples
Returns a new form.
The returned form is emitted into a lexical environment where
COMMIT-FN is bound to a macro with the following behaviour:
(commit-fn metric sample ...)
Each pair of METRIC and SAMPLE are recorded in the timer
METRIC should be a symbol naming the metric to store the sample
under, and SAMPLE should be a REAL number to record. The sample is
coerced to a DOUBLE-FLOAT automatically.
See WITH-SAMPLING
See SAMPLER (type)
cycle-counter) commit-fn) ¶eval-calls) commit-fn) ¶bytes-consed) commit-fn) ¶gc-run-time) commit-fn) ¶system-info) commit-fn) ¶Compute a derived statistic from a vector of samples.
You may add additional methods to this, though the following
computation types are provided by default:
:COUNT
:SAMPLES — The number of samples
:TOTAL — The sum of all samples
:MINIMUM — The smallest sample
:MAXIMUM — The biggest sample
:MEDIAN — The median of all samples
:AVERAGE — The average of all samples
:DEVIATION — The standard deviation based on the average
See *DEFAULT-COMPUTATIONS*
sequence) samples) ¶(eql :deviation)) (samples vector)) ¶(eql :average)) (samples vector)) ¶(eql :median)) (samples vector)) ¶(eql :maximum)) (samples vector)) ¶(eql :minimum)) (samples vector)) ¶(eql :total)) (samples vector)) ¶(eql :samples)) (samples vector)) ¶(eql :count)) (samples vector)) ¶Returns a list of metric types included in the timer.
See TIMER (type)
Print a report about THING to STREAM.
STREAM may be a stream, T, or NIL, according to FORMAT’s output
designators.
COMPUTATIONS may be a list of statistical properties to report on a
vector of samples.
Additional arguments are passed on to PRINT-TABLE
See TIMER (type)
See FORMAT-TIMER-STATS
See PRINT-TABLE
Resets the timer and clears all samples.
See TIMER (type)
Accesses a sample vector for the given metric.
The returned vector is adjustable and has a fill-pointer.
If no vector for the given metric existed before, it is created for
you.
See TIMER (type)
Return a list of variable specs the sampler needs.
Each variable spec should be a list of the following elements:
SYMBOL — The symbol the variable is bound to
DEFAULT — The default value the variable is initialised to
TYPE — The type to declare the variable as
See WITH-SAMPLING
See SAMPLER (type)
cycle-counter)) ¶automatically generated reader method
eval-calls)) ¶automatically generated reader method
bytes-consed)) ¶automatically generated reader method
gc-run-time)) ¶automatically generated reader method
system-info)) ¶automatically generated reader method
Wrap FORM in a form to record sampling data.
Returns the new form.
The returned form is emitted into a lexical environment where
variables according to the SAMPLER’s VARIBALES specs are bound.
See WITH-SAMPLING
See SAMPLER (type)
cycle-counter) form) ¶eval-calls) form) ¶bytes-consed) form) ¶gc-run-time) form) ¶system-info) form) ¶(mapcar (function org.shirakumo.trivial-benchmark::normalize-varspec) (quote (org.shirakumo.trivial-benchmark::h0 org.shirakumo.trivial-benchmark::l0 org.shirakumo.trivial-benchmark::h1 org.shirakumo.trivial-benchmark::l1)))
This slot is read-only.
Representation of a sample measuring method.
See VARIABLES
See WRAP-MEASUREMENT-FORM
See COMMIT-SAMPLES-FORM
See DEFINE-SAMPLER
See WITH-SAMPLING
(mapcar (function org.shirakumo.trivial-benchmark::normalize-varspec) (quote (org.shirakumo.trivial-benchmark::user-run-time-us org.shirakumo.trivial-benchmark::system-run-time-us org.shirakumo.trivial-benchmark::real-time-ms org.shirakumo.trivial-benchmark::gc-run-time-ms org.shirakumo.trivial-benchmark::gc-real-time-ms org.shirakumo.trivial-benchmark:processor-cycles org.shirakumo.trivial-benchmark:eval-calls org.shirakumo.trivial-benchmark:lambdas-converted org.shirakumo.trivial-benchmark:page-faults org.shirakumo.trivial-benchmark:bytes-consed)))
This slot is read-only.
Encompasses a set of samples.
A timer can be re-used to sample in individual steps.
See FORMAT-TIMER-STATS
See SAMPLES
See METRIC-TYPES
See REPORT-TO
See RESET
See WITH-SAMPLING
See WITH-TIMING
(make-hash-table :test (quote eql))
| Jump to: | (
A C D E F G M N P R S U V W |
|---|
| Jump to: | (
A C D E F G M N P R S U V W |
|---|
| Jump to: | *
M S V |
|---|
| Jump to: | *
M S V |
|---|
| Jump to: | B C D E F G O P R S T |
|---|
| Jump to: | B C D E F G O P R S T |
|---|