Skip to content

Commit 5dd92de

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 <[email protected]> Signed-off-by: Patrick Roy <[email protected]>
1 parent 15e7490 commit 5dd92de

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
@@ -144,6 +144,13 @@ def pytest_runtest_logreport(report):
144144
"cpu_model": global_props.cpu_model,
145145
"host_kernel": "linux-" + global_props.host_linux_version,
146146
},
147+
# per coarse-grained test name, dropping parameters and other dimensions to reduce metric count for dashboard
148+
# Note: noideid is formatted as below
149+
# - with parameters: "path/to/test.py::test_name[parameter0,parameter1]"
150+
# - without parameters: "path/to/test.py::test_name"
151+
{
152+
"test_name": report.nodeid.split("[")[0],
153+
},
147154
# per phase
148155
{"phase": report.when},
149156
# per host kernel

0 commit comments

Comments
 (0)