-
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Description
we should be able to assign metrics from variables defined in tests. This could look as follows. We can have a property name vars which will look for key under the vars section of the test. If the key is found we will assign the value to the metric. In this example below we can perform an assertion equality.
buildspecs:
metric_variables:
executor: generic.local.bash
type: script
description: capture metrics from variables
vars:
FOO: BAR
run: echo $FOO
tags: tutorials
metrics:
foo:
type: str
vars: foo
status:
assert_eq:
- name: foo
ref: BARTODO:
- Update JSON Schema to add support for
vars - Add implementation for metrics with vars in https://github.com/buildtesters/buildtest/blob/devel/buildtest/builders/base.py
- Add example buildspec and regression test for metrics
- Add documentation in https://buildtest.readthedocs.io/en/devel/writing_buildspecs/performance_checks.html#defining-metrics.