Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-15873 test: Fix wal checkpoint metric test #14416

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 25 additions & 27 deletions src/tests/ftest/telemetry/wal_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_wal_checkpoint_metrics(self):
ranges = self.telemetry.collect_data(wal_metrics)
for metric in list(ranges):
for label in ranges[metric]:
# Initially all metrics should be 0
# Initially all metrics should be 0 for the first pool after creation
ranges[metric][label] = [0, 0]

self.log_step(
Expand All @@ -167,29 +167,8 @@ def test_wal_checkpoint_metrics(self):
ranges = self.telemetry.collect_data(wal_metrics)
for metric in list(ranges):
for label in ranges[metric]:
uuid = pool.uuid
if uuid in label and self.server_managers[0].manager.job.using_control_metadata:
if '_sumsquares' in metric:
# Check point sum squares should be > 0 after pool create for MD on SSD
ranges[metric][label] = [1]
elif '_dirty_chunks' in metric:
# Check point dirty chunks should be 0-300 after pool create for MD on SSD
ranges[metric][label] = [0, 300]
elif '_dirty_pages' in metric:
# Check point dirty pages should be 0-3 after pool create for MD on SSD
ranges[metric][label] = [0, 3]
elif '_duration' in metric:
# Check point duration should be 0-1,000,000 after pool create for MD on SSD
ranges[metric][label] = [0, 1000000]
elif '_iovs_copied' in metric:
# Check point iovs copied should be >= 0 after pool create for MD on SSD
ranges[metric][label] = [0]
elif '_wal_purged' in metric:
# Check point wal purged should be >= 0 after pool create for MD on SSD
ranges[metric][label] = [0]
else:
# All metrics for the pool w/o check pointing or w/o MD on SSD should be 0
ranges[metric][label] = [0, 0]
# All metrics should be 0 for both pools after creation
ranges[metric][label] = [0, 0]
self.log_step('Verifying WAL check point metrics after creating a pool w/ check pointing')
if not self.telemetry.verify_data(ranges):
self.fail('WAL replay metrics verification failed after pool w/ check pointing create')
Expand All @@ -209,9 +188,28 @@ def test_wal_checkpoint_metrics(self):
if self.server_managers[0].manager.job.using_control_metadata:
for metric in list(ranges):
for label in ranges[metric]:
if pool.uuid in label:
if '_wal_purged' in metric:
# Check point wal purged should be > 0 after check point for MD on SSD
if pool.uuid.casefold() in label.casefold():
# After check pointing has occurred for a pool with for MD on SSD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# After check pointing has occurred for a pool with for MD on SSD
# After check pointing has occurred for a pool with MD on SSD

if '_sumsquares' in metric:
# Check point sum squares should be > 0
ranges[metric][label] = [1]
elif '_stddev' in metric:
# Check point stddev should be >= 0
ranges[metric][label] = [0]
elif '_dirty_chunks' in metric:
# Check point dirty chunks should be 1-300
ranges[metric][label] = [1, 300]
elif '_dirty_pages' in metric:
# Check point dirty pages should be 1-3
ranges[metric][label] = [1, 3]
elif '_duration' in metric:
# Check point duration should be 1-1,000,000
ranges[metric][label] = [1, 1000000]
elif '_iovs_copied' in metric:
# Check point iovs copied should be >= 0
ranges[metric][label] = [1]
elif '_wal_purged' in metric:
# Check point wal purged should be > 0
ranges[metric][label] = [1]
self.log_step(
'Verify WAL checkpoint metrics after check pointing is complete '
Expand Down
Loading