Skip to content

Commit cb23703

Browse files
Manciukicbchalios
authored andcommitted
chore(metric): add per-test metric dimension for coarse grained metrics
The current metric dimensions are so that we have 13k+ different sets of dimensions for each metric, which makes it impossible to plot in CloudWatch. This change adds a new set of dimensions with just the test name so that we reduce it to a few hundreds and are able to plot them (CW limit is 500). Signed-off-by: Riccardo Mancini <mancio@amazon.com> Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
1 parent b5ee7be commit cb23703

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ def pytest_runtest_logreport(report):
142142
"cpu_model": global_props.cpu_model,
143143
"host_kernel": "linux-" + global_props.host_linux_version,
144144
},
145+
# per coarse-grained test name, dropping parameters and other dimensions to reduce metric count for dashboard
146+
# Note: noideid is formatted as below
147+
# - with parameters: "path/to/test.py::test_name[parameter0,parameter1]"
148+
# - without parameters: "path/to/test.py::test_name"
149+
{
150+
"test_name": report.nodeid.split("[")[0],
151+
},
145152
# per phase
146153
{"phase": report.when},
147154
# per host kernel

0 commit comments

Comments
 (0)