Skip to content

Commit d5f3513

Browse files
committed
query correct metric for diff snapshots in snap creation perf test
We have different metrics for snapshot creation latency for full and diff snapshots (why? Good question), so if we're measuring diff snapshot creation latency we need to query diff_create_snapshot instead of full_create_snapshot. Just inline this logic into the test instead of adding a property to SnapshotType because there is literally no other use of this pattern in our tests (if there ever will be, which I doubt, we can still abstract it away). Signed-off-by: Patrick Roy <[email protected]>
1 parent 14cf3f9 commit d5f3513

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/integration_tests/performance/test_snapshot.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,15 @@ def test_snapshot_create_latency(
279279
}
280280
)
281281

282+
match snapshot_type:
283+
case SnapshotType.FULL:
284+
metric = "full_create_snapshot"
285+
case SnapshotType.DIFF:
286+
metric = "diff_create_snapshot"
287+
282288
for _ in range(ITERATIONS):
283289
vm.make_snapshot(snapshot_type)
284290
fc_metrics = vm.flush_metrics()
285291

286-
value = fc_metrics["latencies_us"]["full_create_snapshot"] / USEC_IN_MSEC
292+
value = fc_metrics["latencies_us"][metric] / USEC_IN_MSEC
287293
metrics.put_metric("latency", value, "Milliseconds")

0 commit comments

Comments
 (0)