How danielcristho/croft works
Croft is an experimental Kubernetes autoscaler driven by per-container eBPF and kernel signals. Its main workflow is: the node collector samples processes and kernel counters, records dataset rows and exposes metrics, then croft scale uses calibrated syscall rates to adjust a Deployment. The CLI also collects and analyzes datasets; the Python package provides dataset and Prometheus analysis, while the research harness runs and compares workloads. Several subsystem links are supported by README descriptions rather than sampled call sites, so those links cite the README; unsampled implementation details are not asserted.
Main entry points: cli.rs Croft CLI · run.rs Collector runtime · dataset.rs Dataset pipeline · run.py Experiment runner
Components 26
Node collection
- Croft CLI
collector/collector/src/cli.rs - eBPF probes
collector/collector-ebpf/src - Kernel sensing
collector/collector/src/sensing - Process inspection
collector/collector/src/inspect - Collector runtime
collector/collector/src/command/run.rs - Prometheus metrics
collector/collector/src/pipeline/metrics.rs - Framework detection
collector/collector/src/inspect/framework.rs - Resource inspection
collector/collector/src/inspect/resources.rs
Autoscaling
- Scaling decisions
collector/collector/src/decision/scaler.rs
Dataset analysis
- Dataset pipeline
collector/collector/src/pipeline/dataset.rs - Compressed segments
collector/collector/src/pipeline/segments.rs - Cluster collect
collector/collector/src/command/collect.rs - Dataset statistics
collector/collector/src/command/stats.rs - Resource profiles
collector/collector/src/command/profile.rs - Live top view
collector/collector/src/command/top.rs
Research harness
- Experiment runner
labs/research/experiment/run.py - Web load runs
labs/research/experiment/experiment/web.py - Load profiles
labs/research/experiment/experiment/profiles.py - Test app catalog
labs/research/experiment/experiment/apps.py - Run comparison
labs/research/experiment/experiment/compare.py - Prometheus queries
labs/research/experiment/experiment/prometheus.py
Python analysis
- Python dataset reader
python/src/croft/dataset.py - Python metrics
python/src/croft/metrics.py
Other components
- Operator
- Prometheus
- Kubernetes Deployment
Connections 32
- Operator → Croft CLI: invokes commands
README.md - Croft CLI → Collector runtime: starts collection
- eBPF probes → Kernel sensing: provides kernel events
README.md - Kernel sensing → Collector runtime: supplies signals
README.md - Process inspection → Collector runtime: adds process data
README.md - Collector runtime → Dataset pipeline: writes rows
README.md - Dataset pipeline → Compressed segments: rotates and compresses
README.md - Collector runtime → Prometheus metrics: publishes metrics
README.md - Prometheus metrics → Prometheus: serves Prometheus
README.md - Croft CLI → Scaling decisions: runs scale
- Prometheus → Scaling decisions: provides syscall rates
README.md - Scaling decisions → Kubernetes Deployment: sets replicas
README.md - Croft CLI → Cluster collect: runs collect
- Cluster collect → Dataset pipeline: pulls node data
README.md - Croft CLI → Dataset statistics: runs stats
- Dataset statistics → Dataset pipeline: reads rows
README.md - Croft CLI → Resource profiles: runs profile
- Resource profiles → Dataset pipeline: reads rows
collector/collector/src/command/profile.rs - Croft CLI → Live top view: runs top
- Live top view → Resource inspection: renders resource data
- Collector runtime → Framework detection: detects frameworks
README.md - Collector runtime → Resource inspection: inspects usage
README.md - Python dataset reader → Dataset pipeline: reads dataset format
README.md - Python metrics → Prometheus: queries metrics
python/src/croft/metrics.py - Operator → Experiment runner: runs experiments
- Experiment runner → Web load runs: dispatches web runs
labs/research/experiment/run.py - Experiment runner → Run comparison: dispatches comparisons
labs/research/experiment/run.py - Experiment runner → Test app catalog: loads app catalog
labs/research/experiment/run.py - Web load runs → Load profiles: uses load profiles
labs/research/experiment/experiment/web.py - Web load runs → Test app catalog: runs configured apps
labs/research/experiment/experiment/web.py - Run comparison → Prometheus queries: compares metrics
labs/research/experiment/experiment/compare.py - Run comparison → Test app catalog: uses app definitions
labs/research/experiment/experiment/compare.py