cbtop - Compute Block Top
Real-time load testing and hardware monitoring TUI built on the Brick Architecture.
Installation
# Build from source
# Run
Examples
Explore the PMAT optimization modules with runnable examples:
# Federated Metrics Aggregation (PMAT-048)
# CRDT-based multi-host metrics with GCounter, LwwRegister, OrSet
# Adaptive ML Thresholds (PMAT-049)
# Workload-specific threshold learning with anomaly detection
# Incremental Profile Snapshots (PMAT-050)
# Delta-compressed profile storage with keyframe intervals
# Predictive Scheduling Optimizer (PMAT-051)
# SLO-aware workload scheduling with cost optimization
Features
- Real-time Monitoring: CPU, GPU, memory, network, disk, thermal metrics
- Load Generation: SIMD, CUDA, and wgpu compute workloads
- Compute Scoring: BrickScore framework (0-100) with letter grades
- Multi-Backend: Automatic backend selection (AVX2, CUDA, wgpu)
- Deterministic Mode: Reproducible benchmarks for testing
PMAT Optimization Modules
| Module | Description | Key Types |
|---|---|---|
| PMAT-048 | Federated Metrics Aggregation | GCounter, LwwRegister, OrSet, MetricsFederation |
| PMAT-049 | Adaptive ML Thresholds | AdaptiveThresholdMl, WorkloadClass, TimeSeriesFeatures |
| PMAT-050 | Incremental Profile Snapshots | IncrementalSnapshotStore, ProfileSnapshot, SnapshotQuery |
| PMAT-051 | Predictive Scheduling Optimizer | PredictiveScheduler, HostProfile, SchedulingDecision |
Usage
# Basic monitoring
# With load testing
# Headless benchmarking (JSON output)
Command-Line Options
| Option | Description | Default |
|---|---|---|
-r, --refresh <MS> |
Refresh rate in milliseconds | 100 |
-b, --backend <TYPE> |
Backend: simd, wgpu, cuda, all | all |
-l, --load <LEVEL> |
Load: idle, light, medium, heavy, stress | idle |
-w, --workload <TYPE> |
Workload: gemm, conv, attention, bandwidth | gemm |
--deterministic |
Enable deterministic mode | false |
Keyboard Controls
| Key | Action |
|---|---|
q |
Quit |
Tab |
Next panel |
Space |
Start/Stop load generator |
b |
Cycle backend |
w |
Cycle workload type |
Testing
# Run all tests
# Run falsification tests
Documentation
See the full specification at docs/specifications/compute-block-tui-cbtop.md and the book chapter at book/src/ecosystem/cbtop.md.
Part of the Aprender monorepo — 70 workspace crates.