Skip to content

Commit be101d0

Browse files
committed
test(ab): allow ignoring specific metric with ignore list
Currently, if something matches the A/B-testing ignore list, then all metrics emitted from a test with a dimension set that is a super set of an ignored one is ignored. Refine this to allow only ignoring specific metrics. Realize this by synthesizing a fake dimension called 'metric' that stores the metric. This will later be used when we introduce block latency tests, as we will want to A/B-test throughput but ignore latency in scenarios where fio's async workload generator is used. Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
1 parent 342a07b commit be101d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/ab_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151

5252
def is_ignored(dimensions) -> bool:
53-
"""Checks whether the given dimensions match a entry in the IGNORED dictionary above"""
53+
"""Checks whether the given dimensions match an entry in the IGNORED dictionary above"""
5454
for high_variance in IGNORED:
5555
matching = {key: dimensions[key] for key in high_variance if key in dimensions}
5656

@@ -258,7 +258,7 @@ def analyze_data(
258258

259259
failures = []
260260
for (dimension_set, metric), (result, unit) in results.items():
261-
if is_ignored(dict(dimension_set)):
261+
if is_ignored(dict(dimension_set) | {"metric": metric}):
262262
continue
263263

264264
print(f"Doing A/B-test for dimensions {dimension_set} and property {metric}")

0 commit comments

Comments
 (0)