orchestrata_ultimate.kernel.performance
Reference › orchestrata_ultimate › kernel › performance
Performance and scalability subsystem (decomposed from performance_manager).
The performance and scalability toolbox of the kernel package, SPEC-001 story US-010. It measures how the kernel performs, protects it from overload, spreads work across nodes and tests how it fails. It was split out of a single performance_manager module, which remains as the shim performance_manager. Inside the package, only the facade imports the other modules; the shim is the only outside importer of the package initialiser.
The parts, by role:
- Facade: manager holds
PerformanceManager, which creates and coordinates the rest. - Measurement: metrics has the latency, throughput, memory and uptime trackers; sla has the targets and thresholds they are compared with.
- Protection: resources has the cache, connection pool, batch processor, ring buffer and backpressure controller.
- Distribution: cluster has the consistent hash ring, leader election and cluster manager; scaling has the autoscaler.
- Testing: chaos injects latency, errors and timeouts.
- Support: _common and init.
Callers record measurements into PerformanceManager; it feeds the trackers, and update_load moves the backpressure controller between states, which should_accept_request then uses to shed low-priority requests. evaluate_scaling turns load into a scale decision, and check_sla_compliance compares measurements with targets. The package has no process entry point. Start reading at manager. Nothing in the message-routing code of router or dispatcher imports this package; the related host-level sampler is resource_monitor.
9 modules, 2,666 lines of code.
Modules
| Module | Summary | LOC |
|---|---|---|
__init__ |
Performance and scalability subsystem (decomposed from performance_manager). | 99 |
_common |
Shared performance primitives: logger, constants, time helper. | 70 |
chaos |
Performance subsystem: chaos. | 151 |
cluster |
Performance subsystem: cluster. | 561 |
manager |
Performance subsystem: manager. | 507 |
metrics |
Performance subsystem: metrics. | 339 |
resources |
Performance subsystem: resources. | 665 |
scaling |
Performance subsystem: scaling. | 189 |
sla |
Performance subsystem: sla. | 85 |