Metrics mock¶
Mocking the value of a metric
Iter8 enables you to mock the values of a metric. This is useful for learning purposes and quickly trying out sample Iter8 experiments without having to set up metric databases.
Examples¶
1 2 3 4 5 6 7 8 9 10 |
|
1 2 3 4 5 6 7 8 9 10 11 |
|
Explanation¶
- When the
mock
field is present within a metric spec, Iter8 will mock the values for this metric. - The
name
field refers to the name of the version. Version names should be unique. Version name should match the name of a version in the experiment'sversionInfo
section. If not, any value generated for the non-matching name will be ignored. - You can mock both
Counter
andGauge
metrics. - The semantics of
level
field are as follows:- If the metric is a counter, level is
x
, and time elapsed since the start of the experiment isy
seconds, thenxy
is the metric value. Note that the (mocked) metric value will keep increasing over time. - If the metric is gauge, if level is
x
, the metric value is a random value with meanx
. The expected value of the (mocked) metric will bex
but its observed value may increase or decrease over time.
- If the metric is a counter, level is