EnerOS v0.41.0 Release Notes
- Release Date: 2026-06-22
- Codename: Bench
- Support Status: Stable
- Total Crates: 48
- Test Cases: 6100+
- Contributors: 24
Version Overview
EnerOS v0.41.0 is the opening release of the “Mature Optimization” phase (Phase 5), marking the project’s formal transition from “feature-complete” to an engineering phase of “measurable performance and perceivable regression”. This release builds a complete closed loop from “standard test cases → automatic execution → report generation → regression detection” around the performance benchmarking system, providing a quantifiable, comparable, and traceable baseline for the performance evolution of each subsequent release.
After v0.40.0 established the architectural baseline, EnerOS had completed the construction of core capabilities including the Power-Native kernel, dual-execution architecture, constraint engine, and Agent runtime, but lacked a unified, authoritative, and reproducible measurement system at the performance level. Latency data cited by different teams and in different PRs was often based on their own testing methods and hardware environments, making horizontal comparison difficult and unable to automatically catch performance regressions in CI. v0.41.0 completely solves this problem by introducing the IEEE standard test case set and a self-developed benchmarking framework.
This release also establishes a performance regression detection mechanism: every code commit to the main branch triggers a benchmark suite run, with statistical significance comparison against the previous baseline. If a key metric regresses by more than 5%, the merge is automatically blocked. This mechanism makes performance no longer a post-hoc concern but a first-class citizen integrated into the development workflow.
Key Metrics
| Metric | Value | Description |
|---|---|---|
| Crate count | 48 | All implemented in Rust |
| Lines of code | 210000 | Excluding generated code |
| Test cases | 6100+ | Unit + integration + end-to-end |
| Benchmark suites | 38 | Covering five core kernel domains |
| Standard cases | 10 | IEEE + PEGASE |
| CI regression detection coverage | 92% | Full coverage of critical paths |
New Features
1. Standardized Benchmark Suite
Added the eneros-benchmark crate, providing a unified benchmarking framework. This framework is a secondary wrapper based on criterion, deeply customized for power domain scenarios: supporting parameterized topology scale, hot/cold start separation for power flow computation, batch constraint validation, time-series write throughput statistics, and other power-specific measurement dimensions.
Benchmark Suite Architecture
eneros-benchmark/
├── src/
│ ├── harness/ # Test run framework
│ │ ├── runner.rs # Scheduler and sampler
│ │ ├── sampler.rs # High-precision time sampling (rdtsc)
│ │ └── reporter.rs # Report generator
│ ├── suites/ # Built-in benchmark suites
│ │ ├── topology/ # Topology operation benchmarks
│ │ ├── powerflow/ # Power flow computation benchmarks
│ │ ├── constraint/ # Constraint validation benchmarks
│ │ ├── timeseries/ # Time-series storage benchmarks
│ │ └── agent/ # Agent runtime benchmarks
│ └── fixtures/ # Test data loading
└── benchmarks/ # External scripts
Usage Example
use eneros_benchmark::{BenchmarkSuite, BenchmarkConfig, TopologyFixture};
use std::time::Duration;
// Create a topology loading benchmark
let suite = BenchmarkSuite::new("topology_load")
.config(BenchmarkConfig {
warmup_time: Duration::from_secs(3),
measurement_time: Duration::from_secs(10),
sample_size: 100,
noise_threshold: 0.03,
})
.param("nodes", vec![118, 300, 1000, 3000, 10000])
.fixture(TopologyFixture::IEEE118);
// Run and produce report
let report = suite.run(|ctx| {
let nodes = ctx.param("nodes");
let graph = eneros_topology::load_benchmark_graph(nodes);
ctx.measure("load_time", || {
eneros_topology::NetworkGraph::from_raw(graph.clone())
});
});
report.save("reports/topology_load.json")?;
Measurement Dimensions
| Dimension | Unit | Description |
|---|---|---|
| Latency P50/P95/P99 | Microseconds / milliseconds | Single operation latency distribution |
| Throughput | ops/s | Operations per second |
| Jitter | Microseconds | Difference between P99 and P50 |
| Peak memory | MB | Peak resident memory |
| Allocation count | count/operation | Heap allocation count |
| System call count | count/operation | syscall count |
2. IEEE Standard Test Cases
Built-in IEEE standard test systems as the golden reference for performance benchmarks, ensuring all performance data is reproducible and comparable. Currently supports IEEE 9/14/30/39/57/118/300 node systems, as well as PEGASE 1354/9241/13659 node European grid models.
| Case | Node Count | Branch Count | Source | Applicable Scenarios |
|---|---|---|---|---|
| IEEE 9 | 9 | 9 | Anderson | Unit testing, quick validation |
| IEEE 14 | 14 | 20 | IEEE | Small-medium power flow |
| IEEE 30 | 30 | 41 | IEEE | Standard dispatching problem |
| IEEE 39 | 39 | 46 | New England | Dynamic stability |
| IEEE 57 | 57 | 80 | IEEE | Medium scale |
| IEEE 118 | 118 | 186 | IEEE | Standard benchmark |
| IEEE 300 | 300 | 411 | IEEE | Large-scale power flow |
| PEGASE 1354 | 1354 | 1991 | PEGASE | European transmission grid |
| PEGASE 9241 | 9241 | 16049 | PEGASE | Large interconnected grid |
| PEGASE 13659 | 13659 | 20467 | PEGASE | Ultra-large-scale stress testing |
use eneros_benchmark::fixtures::ieee;
// Load IEEE 118 node system
let case = ieee::IEEE118.load()?;
println!("Bus count: {}", case.buses.len());
println!("Branch count: {}", case.branches.len());
// Load PEGASE 9241 node system (European grid)
let pegase = ieee::PEGASE9241.load()?;
3. Performance Regression Detection
The benchmark suite is deeply integrated with the CI pipeline. Every code commit to the main branch triggers a benchmark suite run, with statistical significance comparison against the previous baseline. The detection algorithm is based on Welch’s t-test, which makes no equal-variance assumption about the sample distribution and can effectively distinguish real regressions from noise fluctuations.
Regression Detection Configuration
use eneros_benchmark::regression::{RegressionGate, Threshold, Severity};
let gate = RegressionGate::new()
.baseline("reports/baseline.json")
.threshold(Threshold {
max_regression_pct: 5.0, // Alert if regression exceeds 5%
max_regression_severity: Severity::Warn,
critical_paths: vec![
"topology_load.118",
"powerflow.newton.118",
"constraint.check.single",
"timeseries.write.50k",
],
})
.statistical_test("welch_t")
.significance_level(0.01);
let result = gate.compare(&new_report)?;
if result.has_regressions() {
for reg in &result.regressions {
eprintln!("Regression: {} degraded {:.1}%", reg.benchmark, reg.delta_pct);
}
std::process::exit(1); // Block merge
}
Regression Detection Strategy
| Metric Change | Determination | CI Behavior |
|---|---|---|
| Improvement > 2% | Improvement | Pass, update baseline |
| Change within ±2% | Noise | Pass |
| Regression 2% - 5% | Warning | Pass but flagged |
| Regression 5% - 10% | Regression | Block merge |
| Regression > 10% | Severe regression | Block and notify |
4. Benchmark Report Generation
Each benchmark run automatically generates multi-format reports, supporting JSON, HTML, and Markdown outputs, with a comparison view against historical baselines. The HTML report has built-in interactive charts for online viewing of latency distribution histograms, throughput trend curves, and regression heatmaps.
use eneros_benchmark::report::{Report, ReportFormat, CompareView};
let report = suite.run(|ctx| { /* ... */ });
// Multi-format output
report.save("reports/topology_load.json", ReportFormat::Json)?;
report.save("reports/topology_load.html", ReportFormat::Html)?;
report.save("reports/topology_load.md", ReportFormat::Markdown)?;
// Compare with historical baseline
let compare = CompareView::new()
.current(&report)
.baseline("reports/baseline.json")
.history(vec!["reports/v0.40.json", "reports/v0.39.json"]);
compare.render("reports/compare.html")?;
5. Comparison with Competitors
The benchmark suite includes built-in comparison tests with similar products, horizontally comparing under the same hardware and input data. Comparison targets include open-source power flow computation libraries (Pandapower, PyPSA) and commercial SCADA platforms.
| Operation | EnerOS | Pandapower | PyPSA | Commercial Platform |
|---|---|---|---|---|
| Topology load (118 nodes) | 0.8ms | 120ms | 95ms | 15ms |
| Power flow (118 nodes) | 2.7ms | 45ms | 38ms | 8ms |
| Constraint check (single) | 8μs | N/A | N/A | 50μs |
| Time-series write (10K points/s) | 50 | 1.2 | 0.8 | 12 |
| Memory usage (118 nodes) | 12MB | 180MB | 150MB | 45MB |
Note: Comparison data measured on the same hardware (Intel Xeon 8358, 2.6GHz, 64GB RAM). Pandapower/PyPSA based on default Python runtime.
Improvements
Power Flow Solver Benchmarking
The Newton-Raphson solver in eneros-powerflow introduces pre-ordering cache for sparse LU decomposition. On the IEEE 300 node standard test system, single power flow solving decreased from 4.2ms to 2.7ms.
Topology Snapshot Zero Copy
Snapshot reads in eneros-topology changed to CoW (Copy-on-Write) implementation, with read latency reduced from 12μs to 1.2μs, and no degradation as topology scale increases.
Agent Context Construction Optimization
Agent context construction changed from full copy to reference snapshot, with construction latency reduced from 50μs to 8μs.
Bug Fixes
- BG-201: Benchmark suite had insufficient time sampling precision on Windows, switched to QueryPerformanceCounter
- BG-205: PEGASE 13659 had excessive peak memory during loading, introduced streaming loading path
- BG-209: Regression detection had high false positive rate when sample size < 30, added minimum sample size validation
- BG-213: HTML report had abnormal chart rendering in Safari, fixed
Breaking Changes
BC-201: BenchmarkSuite::run Closure Signature Change
The closure parameter changed from &mut Context to &BenchmarkContext, with a new measure method added.
// v0.40.0 (old)
suite.run(|ctx| {
let result = operation();
ctx.record("time", start.elapsed());
});
// v0.41.0 (new)
suite.run(|ctx| {
ctx.measure("time", || operation());
});
Dependency Upgrades
| Dependency | Old Version | New Version | Description |
|---|---|---|---|
| criterion | 0.5 | 0.5.1 | Statistical testing enhancements |
| plotters | 0.3 | 0.3.5 | Chart rendering |
| serde_json | 1.0.108 | 1.0.111 | Performance optimization |
Upgrade Guide
Upgrade from v0.40.0
rustup default 1.75.0
cargo update
cargo test --workspace
Add benchmark dependency in Cargo.toml:
[dev-dependencies]
eneros-benchmark = "0.41"
Run built-in benchmark suite:
cargo bench --workspace
Related Documentation
- Performance Benchmarking Guide - Detailed benchmark suite usage
- IEEE Standard Cases - Standard test system description
- Regression Detection - CI performance gate configuration