module
Lapis::Benchmark
Defined in:
libgodot/benchmarks.crClass Method Summary
- .after_case(&block : Case, Result, Context -> Nil)
- .after_group(&block : Group, GroupResult, Context -> Nil)
- .after_suite(&block : Summary, Context -> Nil)
- .all : Array(Case)
- .all_groups : Array(Group)
- .before_case(&block : Case, Context -> Nil)
- .before_group(&block : Group, Context -> Nil)
-
.before_suite(&block : Context -> Nil)
Register lifecycle hooks
- .clear : Nil
- .find_group(name : String) : Group | Nil
-
.group(name : String, category : Category = Category::Custom, description : String = "", &block : Group -> Nil) : Group
Define a comparison group containing multiple benchmarks or language targets
-
.register(name : String, category : Category = Category::Custom, description : String = "", &block : Int32 -> Nil) : Case
Register a single benchmark case in Crystal
-
.report_elapsed_ms(ms : Float64) : Nil
Allows a benchmark to specify its own accurate elapsed time
-
.report_metric(key : String, value : Float64) : Nil
Allows a benchmark to report secondary custom metrics (compile time, memory, throughput)
-
.report_output(val : String) : Nil
Allows a benchmark to specify its output result / checksum for parity verification
-
.run_all(iterations : Int32 = 3, ctx : Context | Nil = nil) : Array(Result)
Run all registered benchmarks
-
.run_all_groups(iterations : Int32 = 3, ctx : Context | Nil = nil) : Array(GroupResult)
Run all registered groups
-
.run_case(c : Case, iterations : Int32 = 3) : Result
Measure a single benchmark case across N iterations
-
.run_group(group : Group, iterations : Int32 = 3, ctx : Context | Nil = nil) : GroupResult
Execute a group and return comparative results against the designated baseline
-
.run_target(target : TargetSpec, iterations : Int32 = 3, ctx : Context | Nil = nil) : TargetResult
Measure an in-engine target within a group across N iterations
- .trigger_after_case(c : Case, r : Result, ctx : Context) : Nil
- .trigger_after_group(g : Group, gr : GroupResult, ctx : Context) : Nil
- .trigger_after_suite(sum : Summary, ctx : Context) : Nil
- .trigger_before_case(c : Case, ctx : Context) : Nil
- .trigger_before_group(g : Group, ctx : Context) : Nil
-
.trigger_before_suite(ctx : Context) : Nil
Trigger lifecycle hooks
Class Method Detail
Define a comparison group containing multiple benchmarks or language targets
Register a single benchmark case in Crystal
Allows a benchmark to specify its own accurate elapsed time
Allows a benchmark to report secondary custom metrics (compile time, memory, throughput)
Allows a benchmark to specify its output result / checksum for parity verification
Run all registered benchmarks
Run all registered groups
Measure a single benchmark case across N iterations
Execute a group and return comparative results against the designated baseline
Measure an in-engine target within a group across N iterations