class Novika::Frontend::CLI::Profiler
- Novika::Frontend::CLI::Profiler
- Reference
- Object
Overview
A crude sample-based profiler which is triggered on every form the engine tries to execute.
Counts the amount of times a form was attempted to be open by the engine.
You can use #to_table
to convert a snapshot of data to a
Tablo::Table
table.
Included Modules
Defined in:
cli.crConstructors
-
.new(period : UInt64 = 32_u64)
Initializes this profiler.
Instance Method Summary
-
#on_form_begin(engine : Engine, form : Form)
Invoked before engine opens the given form.
-
#to_table(cutoff = 0.01)
Assembles and returns the data from this profiler as a
Tablo::Table
.
Instance methods inherited from module Novika::IExhaustTracker
on_form_begin(engine : Engine, form : Form)
on_form_begin,
on_form_end(engine : Engine, form : Form)
on_form_end
Constructor Detail
Initializes this profiler.
period is the period between samples, in Engine loop ticks. The less the value, the more samples are taken and the more precise the results are (but the program may run slower).
Instance Method Detail
Invoked before engine opens the given form.
Assembles and returns the data from this profiler as
a Tablo::Table
.
cutoff specifies the ratio [0-1] below which profiles should be rejected (i.e., too insignificant).