class Bindgen::Statistics
- Bindgen::Statistics
- Reference
- Object
Overview
Simple collector of run-time statistics.
Defined in:
bindgen/statistics.crConstant Summary
-
DEPTH_MULTIPLIER =
2
-
HEAP_COLUMN_SIZE =
8
-
JUSTIFY_OFFSET =
2
Constructors
Instance Method Summary
-
#after : GC::Stats | Nil
Garbage collector statistics after the measures.
-
#after? : GC::Stats | Nil | Nil
Garbage collector statistics after the measures.
-
#before : GC::Stats
Garbage collector statistics before any measures.
-
#finish! : self
Finishes the statistics collection.
-
#heap_size_change : Int64
Returns how much the heap size has changed during the measurements
-
#measure(stage_name : String, &)
Measures execution of the given block.
-
#stages : Hash(String, Bindgen::Statistics::Timing)
Collected stages
-
#to_s(depth : Int32) : String
Returns a formatted human-readable string.
-
#to_s(io, depth = 0, justification = nil)
Writes formatted human-readable data into io.
-
#total_duration : Time::Span
Returns the total duration of all measured steps.
Constructor Detail
Instance Method Detail
Garbage collector statistics after the measures. Only available after
calling #finish!
Garbage collector statistics after the measures. Only available after
calling #finish!
Measures execution of the given block. Returns the result of the block.
The measured data is put into #stages
.
Writes formatted human-readable data into io.
Returns the total duration of all measured steps. The timings between the stages is not recorded, and is thus excluded from the total duration.