Commit 9803ff8
Config-driven monitor (#40)
* binder deployment bugs fixed
* first version live plotting
* layout fixes
* init for multi node monitor slurm feature
* testing
* first working version based on srun, no visualizer yet
* refactoring of monitors.
provide the following monitors:
- thread
- subprocess (default)
- native c (C process)
- slurm (based on srun)
* split visualizer into backends; templates directory tree reworked
* rework live grid and header code as the template components
* TESTING: performance optimization for monitors
- 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)
* TESTING: performance optimization for monitors
- updates in C implementation
- fixes in data plotting for high resolution data (~20Hz)
* TESTING: performance optimization for monitors
- fixed missed data point rate in Python-based monitors
- add benchmark
* add proper benchmark sbatch
* TESTING: performance optimization for monitors
- benchmark fixes
* TESTING: performance optimization for monitors
- benchmark fixes
* TESTING: performance optimization for monitors
- add sanity check for metrics at beginning of benchmark
* TESTING: performance optimization for monitors
- improve sanity check
* TESTING: performance optimization for monitors
- fix sanity check and benchmark
* TESTING: performance optimization for monitors
- tidy up monitor processes properly
* TESTING: performance optimization for monitors
- use float parsing instead int parsing for frequencies to allow frequencies < 1
* TESTING: performance optimization for monitors
- fix in process count for thread backend
* TESTING: performance optimization for monitors
- proper packaging, incl. gcc build of native c monitor when calling perfmonitor_start
- documentation updates in readme and doc
* TESTING: performance optimization for monitors
- sanity check, docs and build
* fixes in running benchmark, different frequency range
* avoid loading plotly from CDN on each update, updating existing chart in-place via Plotly.react instead
* minor issues with tests compatibility and start monitor string parsing logic fixed
* TESTING: performance optimization for monitors
- benchmark fixes
* TESTING: performance optimization for monitors
- add debugging to benchmark
* data modlue refactored to align multinode architecture
* monitor backends and visualizer refactored to align with the new multinode monitor surface
* visualizer logic and frontend djustments for handling multinode performance data
* invisible <Aggregated> dropdown for single node setups
* multinode monitor's time_mark time format bug fixed
* config-driven monitor: StorageHandler pipeline, list buffer, YAML plot config
* visualizer: renderer registry (render.py + renderers.py), replace if/elif dispatch
* render: switch PlotResult/SeriesItem to Pydantic, attribute access in backends
* remove duplicate hardware fields from PerformanceMonitor and SubprocessPerformanceMonitor
* add pydantic>=2.0 and pyyaml dependencies, include config YAML in package data
* monitor/metrics: add CollectionContext TypedDict
* config: add instantiate_backend(), extend instantiate() with DI via inspect.signature
* monitor/metrics: decouple ProcessBackend from monitor, add snapshot(context)
* monitor/metrics: decouple CPU, memory, IO backends — inject NodeInfo, use CollectionContext
* monitor/metrics: decouple GPU backends — inject uid/slurm_job, inline process filtering
* monitor: wire two-phase pipeline — available dict, instantiate_backend, CollectionContext per tick
* tests: update monitor tests for new architecture
* monitor/metrics: split GpuBackendDiscovery into GpuDiscovery + MultiGpuBackend
* config, monitor: build pipeline from collectors.yaml
* config, monitor: inject collector deps via yaml inject: field
* pipeline builder class added
* monitor: add type annotations across monitor subsystem
* tests: update for PerformanceData and NodeDataStore API
* monitor: replace dict[str, Any] with bare dict
* make all metric backends follow collector semantics
* tests for metric backends follow collector semantics
* fix: replace missing _get_process_pids() with _process_backend.get_process_pids()
* refactor: align PsutilProcessCollector to common pipeline interface
- snapshot() now sets context[process_pids] via get_process_pids()
- add no-op collect() to satisfy pipeline protocol
- add NoOpHandler / noop storage type for context-only backends
- register process backend first in collectors.yaml (must stay first)
- remove explicit _process_backend construction from PerformanceMonitor;
expose via property backed by pipeline[0]
- fix IndexError (psutil TOCTOU race) in process_iter prefetch
* fix: guard _attach_cell_index against missing time column
Regression from 1446ae7 where service switched from monitor.data.view()
to monitor.nodes.view(). The C collector binary sends empty
columns_by_level in its ready message, so the schema fallback DataFrame
has no columns, and _attach_cell_index crashed on result["time"].
Fix: early return from _attach_cell_index when time column is absent.
* refactor: replace storage type dispatch with _target_-based handler instantiation
Rename storage.py to handlers.py, storage: key to handler: in collectors.yaml,
and drop make_handler() in favour of instantiate() used directly in pipeline.
* refactor: remove instantiate_backend, inline direct GPU backend construction
* refactor: introduce CollectorBackend ABC and StorageHandler Protocol in metrics/common.py
* chore: remove unnecessary `from __future__ import annotations` (Python 3.12)
* feat: add NetworkCollector with psutil backend and network plot subsets
Adds PsutilNetworkCollector (net_bytes_sent, net_bytes_recv,
net_packets_sent, net_packets_recv at system level) registered in
collectors.yaml with CumulativeRateHandler. Adds network subset to
plots.yaml including composite net_vs_disk_read panel.
Also adds `from __future__ import annotations` to common.py for
Python 3.9 compatibility and improves CollectorBackend/StorageHandler
docstrings.
* feat: expose subprocess_python as explicit --monitor choice
Adds subprocess_python to parser choices and service factory so users
can select it directly via %perfmonitor_start --monitor subprocess_python.
* docs: add custom collector guide and network metric visualization sections
Main README: adds "Adding a Custom Collector" section (3-step guide,
file layout, inject: key explanation) and "Visualizing Custom Collector
Metrics" section (plot types table, composite_series example, --metrics
usage note). Monitor README: updates directory layout to include network/.
* Add default_subsets attribute and move resolution earlier in plot pipeline
- 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 default_subsets to plots.yaml
* Update session exporter to use visualizer default_subsets
* docs: document default_subsets config key in README
* minor adjustments in README.md Custom Monitors section
* docs: move custom collector sections from README to dedicated guides
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.
* docs: enable admonition markdown extension
* docs: minor README adjustments
* Add guard and warning for missing time column in filter_perfdata
* fix: move time field inside sample in C collector output
* fix: emit flat handler-compatible columns from C collector
* feat: add columns_by_level to C collector ready message
* Disable network collector and remove from default subsets
* refactor: move collectors config to config/python/ subdirectory
Prepares for future C collector config under config/c/; each backend
subdirectory owns its loader, config/utils.py reduced to instantiate().
* refactor: split native C collector into per-metric backends
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.
* docs: split custom-collector guide into python and c variants
- 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
* test: add native_c backend tests
* version update, yaml include
* fixes in jpeg export, reload_ext function
* fix tests and native_c monitor make
---------
Co-authored-by: Elias Werner <elias.werner@tu-dresden.de>1 parent de648ce commit 9803ff8
125 files changed
Lines changed: 10384 additions & 3243 deletions
File tree
- docs/guides
- jumper_extension
- adapters
- data
- visualizer
- backends
- config
- collectors
- c
- python
- core
- ipython
- monitor
- backends
- native_c
- metrics
- cpu
- gpu
- io
- memory
- slurm_multinode
- subprocess_python
- thread
- benchmark
- metrics
- cpu
- gpu
- io
- memory
- network
- process
- templates
- visualizer
- plotly
- add_panel_button
- cell_range_slider
- live_grid
- live_header
- live_update
- node_selector
- panel
- show_idle_checkbox
- toolbar
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
176 | 183 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
233 | 239 | | |
234 | 240 | | |
235 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
236 | 277 | | |
237 | 278 | | |
238 | 279 | | |
| |||
280 | 321 | | |
281 | 322 | | |
282 | 323 | | |
283 | | - | |
284 | 324 | | |
285 | 325 | | |
286 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
0 commit comments