Skip to content

Config-driven monitor - #40

Merged
elwer merged 90 commits into
mainfrom
feature/config-driven-monitor
Jun 15, 2026
Merged

Config-driven monitor#40
elwer merged 90 commits into
mainfrom
feature/config-driven-monitor

Conversation

@OutlyingWest

Copy link
Copy Markdown
Collaborator

Changes:

  • Config-driven pipeline - collectors and storage handlers are built from YAML config (collectors.yaml); dependency injection via inject: field
  • Architecture refactoring - introduced CollectorBackend ABC, StorageHandler Protocol, CollectionContext TypedDict; decoupled metric backends from monitor
  • NetworkCollector - new example collector with psutil backend and network plot subsets
  • default_subsets - added to plots.yaml and visualizer
  • Renderer registry - replaced if/elif dispatch with a registry (render.py + renderers.py); PlotResult/SeriesItem switched to Pydantic models
  • Docs - custom collector and metrics guides moved to MkDocs dedicated pages
  • C-monitor refactored to emit flat dict - following the updated protocol (ref: c-monitor bug "perfdata is missing 'time' column")
  • Tests - updated for new PerformanceData/NodeDataStore API and collector semantics

OutlyingWest and others added 30 commits April 1, 2026 17:40
provide the following monitors:
- thread
- subprocess (default)
- native c (C process)
- slurm (based on srun)
- do not retrieve the filtered processes (user/slurm processes) for multiple metrics multiple times but only once per tick
- rss instead of uss (similar to top)
- buffering of performance data (e.g. we do not need to read process a second time for user level)
- updates in C implementation
- fixes in data plotting for high resolution data (~20Hz)
- fixed missed data point rate in Python-based monitors
- add benchmark
- add sanity check for metrics at beginning of benchmark
- fix sanity check and benchmark
- tidy up monitor processes properly
- use float parsing instead int parsing for frequencies to allow frequencies < 1
- fix in process count for thread backend
- proper packaging, incl. gcc build of native c monitor when calling perfmonitor_start
- documentation updates in readme and doc
- sanity check, docs and build
…eline

- Introduce self.default_subsets to replace hardcoded metric subset defaults
- Load default_subsets from config in _load_subsets_from_config()
- Move _resolve_metric_subsets call before level check in plot() to ensure GPU detection happens first
- Prevent duplicate gpu/gpu_all metrics when default_subsets already contains them
- Update plot method signatures to use None instead of tuple default for metric_subsets
Add docs/guides/custom-collector.md and docs/guides/visualizing-custom-collector-metrics.md.
Replace the two large README sections with short teasers linking to the new guides.
Add a collector tip to the custom-monitor guide. Register both pages in mkdocs nav.
@OutlyingWest
OutlyingWest requested a review from elwer May 19, 2026 11:17
@github-actions

Copy link
Copy Markdown

Prepares for future C collector config under config/c/; each backend
subdirectory owns its loader, config/utils.py reduced to instantiate().
@github-actions

Copy link
Copy Markdown

OutlyingWest and others added 4 commits May 21, 2026 13:57
Replace monolithic collector.c with a structured layout mirroring the
Python metrics hierarchy:

  native_c/
    monitor.h          — shared TickContext + CCollector interface
    monitor.c          — main(), registry, emit_ready/emit_tick
    metrics/cpu/       — /proc/<pid>/stat + /proc/stat
    metrics/memory/    — /proc/<pid>/statm + /proc/meminfo
    metrics/io/        — /proc/<pid>/io + /proc/diskstats
    metrics/gpu/       — NVML via dynamic loading

Active collectors are selected via --collectors arg driven by
config/c/collectors.yaml, loaded by CSubprocessPerformanceMonitor.
Makefile updated to compile all five translation units via make.
- Replace custom-collector.md with python-custom-collector.md and c-custom-collector.md
- Update README.md and monitor/README.md with links to both guides
- Register both guides in mkdocs.yml nav
@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

@elwer
elwer merged commit 9803ff8 into main Jun 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants