Skip to content

feat: add CDMMetrics class and cpu topology helpers#111

Merged
k-rister merged 2 commits into
mainfrom
cdm-metrics-class
May 6, 2026
Merged

feat: add CDMMetrics class and cpu topology helpers#111
k-rister merged 2 commits into
mainfrom
cdm-metrics-class

Conversation

@k-rister
Copy link
Copy Markdown
Contributor

@k-rister k-rister commented May 5, 2026

Summary

  • Add toolbox.cdm_metrics with CDMMetrics class — thread-safe metric logging where each instance maintains its own state (unlike the existing metrics.py which uses module-level globals)
  • Add build_cpu_topology() and get_cpu_topology() helper functions to system_cpu_topology.py, matching the Perl toolbox::cpu interface. Handles null bytes in sysfs files copied from containers.

These support porting benchmark/tool post-processors to Python3 with threading. The existing metrics.py is unchanged — callers migrate incrementally.

Test plan

  • sysstat-post-process.py validated with crucible run (fio benchmark, 2 successful runs)
  • procstat-post-process.py validated with crucible run

🤖 Generated with Claude Code

k-rister and others added 2 commits May 5, 2026 14:30
New module toolbox.cdm_metrics with a CDMMetrics class where each
instance maintains its own state. This enables safe concurrent use
from multiple threads, unlike the existing metrics.py which uses
module-level globals.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add lightweight CPU topology functions matching the Perl
toolbox::cpu interface. Reads sysfs topology files with null-byte
handling for copied-from-sysfs files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@k-rister k-rister self-assigned this May 5, 2026
@k-rister k-rister requested a review from a team May 5, 2026 19:52
@project-crucible-tracking project-crucible-tracking Bot moved this to In Progress in Crucible Tracking May 5, 2026
@k-rister k-rister merged commit 4615460 into main May 6, 2026
174 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Crucible Tracking May 6, 2026
@k-rister k-rister deleted the cdm-metrics-class branch May 6, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants