class School::Metrics
- School::Metrics
- Reference
- Object
Overview
Rule engine metrics accumulator.
Defined in:
school/domain/metrics.crConstant Summary
-
INSTANCE =
new
Class Method Summary
- .conditions
- .count_condition
- .count_operation
- .count_rule
- .count_run
-
.instance
Returns the
Metrics
singleton instance. - .metrics
- .operations
- .reset
- .rules
- .runs
- .start
Instance Method Summary
- #conditions : Int32
-
#count_condition
Increments conditions.
-
#count_operation
Increments operations.
-
#count_rule
Increments rules.
-
#count_run
Increments runs.
-
#metrics(*, now = Time.utc)
Returns the metrics.
- #operations : Int32
-
#reset(*, runs : Int32 = 0, rules : Int32 = 0, conditions : Int32 = 0, operations : Int32 = 0, start : Time = Time.utc)
Resets internal state.
- #rules : Int32
- #runs : Int32
-
#runtime(*, now = Time.utc)
Returns the runtime.
- #start : Time
Class Method Detail
Instance Method Detail
def metrics(*, now = Time.utc)
#
Returns the metrics.
A parameter for the current time is provided for testing purposes.
def reset(*, runs : Int32 = 0, rules : Int32 = 0, conditions : Int32 = 0, operations : Int32 = 0, start : Time = Time.utc)
#
Resets internal state.
Parameters for explicitly setting internal state are provided for testing purposes.
def runtime(*, now = Time.utc)
#
Returns the runtime.
A parameter for the current time is provided for testing purposes.