Skip to main content

v0.41.0 Release Notes

Release Notes

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

MetricValueDescription
Crate count48All implemented in Rust
Lines of code210000Excluding generated code
Test cases6100+Unit + integration + end-to-end
Benchmark suites38Covering five core kernel domains
Standard cases10IEEE + PEGASE
CI regression detection coverage92%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

DimensionUnitDescription
Latency P50/P95/P99Microseconds / millisecondsSingle operation latency distribution
Throughputops/sOperations per second
JitterMicrosecondsDifference between P99 and P50
Peak memoryMBPeak resident memory
Allocation countcount/operationHeap allocation count
System call countcount/operationsyscall 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.

CaseNode CountBranch CountSourceApplicable Scenarios
IEEE 999AndersonUnit testing, quick validation
IEEE 141420IEEESmall-medium power flow
IEEE 303041IEEEStandard dispatching problem
IEEE 393946New EnglandDynamic stability
IEEE 575780IEEEMedium scale
IEEE 118118186IEEEStandard benchmark
IEEE 300300411IEEELarge-scale power flow
PEGASE 135413541991PEGASEEuropean transmission grid
PEGASE 9241924116049PEGASELarge interconnected grid
PEGASE 136591365920467PEGASEUltra-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 ChangeDeterminationCI Behavior
Improvement > 2%ImprovementPass, update baseline
Change within ±2%NoisePass
Regression 2% - 5%WarningPass but flagged
Regression 5% - 10%RegressionBlock merge
Regression > 10%Severe regressionBlock 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.

OperationEnerOSPandapowerPyPSACommercial Platform
Topology load (118 nodes)0.8ms120ms95ms15ms
Power flow (118 nodes)2.7ms45ms38ms8ms
Constraint check (single)8μsN/AN/A50μs
Time-series write (10K points/s)501.20.812
Memory usage (118 nodes)12MB180MB150MB45MB

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

DependencyOld VersionNew VersionDescription
criterion0.50.5.1Statistical testing enhancements
plotters0.30.3.5Chart rendering
serde_json1.0.1081.0.111Performance 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