Skip to content

RPOPC-1304: Add multi-metric support for FIO benchmark#32

Merged
grdumas merged 1 commit into
mainfrom
feat/RPOPC-1304-fio-multi-metric
Jun 15, 2026
Merged

RPOPC-1304: Add multi-metric support for FIO benchmark#32
grdumas merged 1 commit into
mainfrom
feat/RPOPC-1304-fio-multi-metric

Conversation

@grdumas

@grdumas grdumas commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Extends primary_metrics support to FIO benchmark to capture bandwidth, IOPS, and latency as coequal metrics.

Acceptance Criteria

  • FIO results include all three metrics in primary_metrics
  • Dashboard can display bandwidth, IOPS, and latency from top-level results
  • Tests validate multi-metric extraction

Changes

  • Removed old single-metric implementation (max_bandwidth only)
  • Override _extract_primary_metrics() to extract all three metrics from runs
  • Calculate mean values across all FIO workload runs for each metric:
    • total_bandwidth_kbps → bandwidth (KiB/s)
    • total_iops → iops (IOPS)
    • avg_latency_mean_ns → latency (nanoseconds)
  • Added comprehensive tests for multi-run and single-run scenarios

Testing

  • Unit tests added/updated (2 new FIO multi-metric tests)
  • All tests passing (233/233)
  • Follows uperf pattern from RPOPC-1275

Related

Generated with Claude Code

…rimary_metrics

- Add failing tests for multi-metric extraction from FIO runs
- Override _extract_primary_metrics() to extract all three metrics from runs
- Calculate mean values for bandwidth (KiB/s), IOPS, latency (nanoseconds)
- Remove old single-metric (max_bandwidth) implementation from build_results()
- All tests pass (2 new FIO multi-metric tests)

Implements RPOPC-1304. FIO now exposes all three disk I/O performance metrics
as coequal primary_metrics, enabling dashboard to display comprehensive results.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • New Features

    • FIO processor now reports three coequal primary metrics—mean bandwidth, mean IOPS, and mean latency—computed across all runs, replacing the previous single maximum bandwidth metric.
  • Tests

    • Added validation tests for FIO multi-metric extraction, covering multiple-run and single-run scenarios.

Walkthrough

FioProcessor drops the single max_bandwidth build_results() method and gains a _extract_primary_metrics() helper that computes mean bandwidth, IOPS, and latency across all runs and returns them as coequal PrimaryMetric objects. Two new unit tests validate multi-run averaging and single-run passthrough.

Changes

FioProcessor Coequal Primary Metrics

Layer / File(s) Summary
_extract_primary_metrics implementation
src/chronicler/processors/fio_processor.py
Removes build_results() and adds _extract_primary_metrics(), which iterates over runs (supporting both dict and object access), accumulates total_bandwidth_kbps, total_iops, and avg_latency_mean_ns, computes means, and returns a list of three PrimaryMetric objects or None. StatisticalSummary is added to the schema import.
Unit tests: multi-run and single-run
tests/test_fio_multi_metric.py
Adds test_fio_extracts_all_three_primary_metrics (two-run fixture, asserts averaged values) and test_fio_handles_single_run (one-run fixture, asserts direct passthrough), both patching extract_result_archive and calling build_results().

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding multi-metric support (bandwidth, IOPS, latency) for the FIO benchmark processor, which aligns with the changeset.
Description check ✅ Passed The description is directly related to the changeset, providing context about the multi-metric support addition, acceptance criteria, changes made, and testing performed.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@grdumas grdumas self-assigned this Jun 14, 2026
@grdumas grdumas added the enhancement New feature or request label Jun 14, 2026

@grdumas grdumas left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

PR Review: RPOPC-1304: Add multi-metric support for FIO benchmark

Summary

This PR successfully extends the newly established multi-metric pattern (from RPOPC-1275) to the FIO benchmark processor. By replacing the single max-bandwidth metric with bandwidth, IOPS, and latency as coequal primary metrics, the processor now provides a much more comprehensive view of storage performance.

Positive Notes

  • The implementation in _extract_primary_metrics() cleanly handles both dictionary and dataclass Run objects, aligning perfectly with the base processor fixes introduced in PR #31.
  • Mean calculation logic correctly aggregates across multiple runs.
  • The unit tests provide excellent coverage for both single-run and multi-run scenarios, accurately validating the calculation of means across workloads.

Overall Assessment

  • Status: APPROVE
  • Reasoning: The code cleanly implements the acceptance criteria by extracting all three expected metrics, accurately calculates mean values across runs, and provides strong test coverage.
  • Next Steps: Merge at your convenience.

Reviewed by: Gemini Pro via automated code review

@grdumas

grdumas commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/chronicler/processors/fio_processor.py (1)

100-100: ⚡ Quick win

Simplify loop to iterate over values only.

Since run_key is unused, iterate directly over the values.

♻️ Suggested fix
-        for run_key, run in runs.items():
+        for run in runs.values():
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/chronicler/processors/fio_processor.py` at line 100, The loop in the
fio_processor.py file iterates over both keys and values using runs.items(), but
the run_key variable is never used in the loop body. Simplify this by changing
the loop to iterate directly over the dictionary values using runs.values()
instead, and remove the unused run_key variable from the loop declaration.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/chronicler/processors/fio_processor.py`:
- Line 100: The loop in the fio_processor.py file iterates over both keys and
values using runs.items(), but the run_key variable is never used in the loop
body. Simplify this by changing the loop to iterate directly over the dictionary
values using runs.values() instead, and remove the unused run_key variable from
the loop declaration.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 4835202f-7208-4131-887b-5580a7477d7c

📥 Commits

Reviewing files that changed from the base of the PR and between 1fee56c and b7e3fa9.

📒 Files selected for processing (2)
  • src/chronicler/processors/fio_processor.py
  • tests/test_fio_multi_metric.py

@grdumas grdumas left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

LGTM

@grdumas grdumas merged commit 8097707 into main Jun 15, 2026
2 checks passed
@grdumas grdumas deleted the feat/RPOPC-1304-fio-multi-metric branch June 15, 2026 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant