A record of execution of some particular type of action during profiling.
Check for an intrinsic dimension needed
on record
, while looking for
a value of the derived dimension dim
.
Check for an intrinsic dimension needed
on record
, while looking for
a value of the derived dimension dim
. If needed
is found, get its value
and pass it to f
, using the f
's return value as the value of the dim
dimension. Otherwise, use error
to report the missing dimension. If
eventtype
is empty, accept any event.
Given a record, an event type and a dimension name, return the value of the record at that dimension.
Given a record, an event type and a dimension name, return the value of
the record at that dimension. This implementation provides standard
derived dimensions and defaults to just looking up intrinsic dimensions.
The supported derived dimensions are: type
(the prefix of a Product
given by the record's subject
dimension).
Called when the report writing is about to finish.
Called when the report writing is about to finish. By default this method does nothing.
Return true if the profile tables should include timings.
Return true if the profile tables should include timings. Default: yes.
Check the event type of a record by looking for its event
intrinsic
dimension and comparing to the given event
string.
Check the event type of a record by looking for its event
intrinsic
dimension and comparing to the given event
string. Return true if
it is of the given event type, false otherwise.
Convert a nanoTime difference to ms.
Convert a nanoTime difference to ms.
Send string to the profile output.
Send string to the profile output.
Send string and a newline to the profile output.
Send string and a newline to the profile output. Default: print an empty line.
Process a profiling command-line option value.
Process a profiling command-line option value. By convention we use the
-p
option to introduce this value, but that is not checked here and the
option itself should not be present in the value. The option value is
interpreted as a comma-separated list of dimension names. The list of
names is returned. If the inupt value is the empty strnig, we return an
empty sequence, not a sequence containing an empty string.
Print the profiling report by summarising along the requested dimensions.
Print the profiling report by summarising along the requested dimensions. FIXME: avoid multiple passes through the data?
Whether or not to print the profile tables.
Whether or not to print the profile tables. Some special profile
dimensions produce their own output rather than using the default
table style. They can turn this flag off in the startReport
method to inhibit the default output.
Profile computation
along the given dimensions and produce reports.
Profile computation
along the given dimensions and produce reports.
If dimensionsNames
is empty, run the computation and then enter an
interactive shell to allow reports to be produced.
Start profiling by turning on the profiling system, resetting the events buffer and recording the start time.
Start profiling by turning on the profiling system, resetting the events buffer and recording the start time.
Stop profiling by turning off the profiling system and recording the total execution time.
Stop profiling by turning off the profiling system and recording the total execution time. Return a function that can be used to generate a profile report when given the relevant dimension names.
Stop profiling and generate a profile report for the given dimension names.
Stop profiling and generate a profile report for the given dimension names.
Stop profiling and generate profile reports based on interactively specified dimensions.
Stop profiling and generate profile reports based on interactively specified dimensions.
Called when the report writing is about to start.
Called when the report writing is about to start. By default this method does nothing. The method is passed the dimension names that have been requested so that can react to them.
Summarise attribute evaluations along a list of dimensions.
Summarise attribute evaluations along a list of dimensions.
Run computation
and report timings.
Run computation
and report timings. computation
is first run init
times to warm up the JVM. Then it is run n
more times. The discard
biggest and smallest values are then discarded and the resulting values
are printed.
Print a trace of the events for which a given predicate is true.
Print a trace of the events for which a given predicate is true. If the predicate is omitted it defaults to one that is always true.
Convert an arbitrary value to a string using toString
.
Convert an arbitrary value to a string using toString
. Override this
method to customise how values are shown.
The default profiler, useful for testing via the REPL.