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
mockfield is present within a metric spec, Iter8 will mock the values for this metric. - The
namefield refers to the name of the version. Version names should be unique. Version name should match the name of a version in the experiment'sversionInfosection. If not, any value generated for the non-matching name will be ignored. - You can mock both
CounterandGaugemetrics. - The semantics of
levelfield are as follows:- If the metric is a counter, level is
x, and time elapsed since the start of the experiment isyseconds, thenxyis 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 bexbut its observed value may increase or decrease over time.
- If the metric is a counter, level is