diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d1a92f..7f8dc06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Added +### Planned -- Steel framework support (planned) -- Enhanced testing utilities (compute units, account state validation) +- Steel framework support +- Enhanced testing utilities (account state validation) - Integration with popular Solana testing patterns +## [0.2.0] - 2024-06-11 + +### Added - CU Benchmarking Framework + +- **Systematic CU analysis framework** with instruction and transaction paradigms +- **Dual benchmarking modes**: Pure instruction measurement vs complete transaction workflows +- **Statistical analysis engine** with percentile-based estimates (min, conservative, balanced, safe, very_high, unsafe_max) +- **Rich execution context discovery** through simulation (SVM state, program details, CPI analysis) +- **Professional tooling integration** with env_logger and clean JSON output +- **Comprehensive unit tests** (324 lines) covering edge cases and percentile calculations + +### Framework Features + +- `InstructionBenchmark` trait for pure CU measurement without framework overhead +- `TransactionBenchmark` trait for multi-program workflow analysis +- Two-phase measurement: simulation for context + execution for statistics +- Address book system for human-readable program names +- Type-safe domain modeling with `StatType` enum + +### Examples & Documentation + +- **Working benchmarks**: SOL transfer (150 CU), SPL token transfer, token setup workflow (28K-38K CU) +- **Comprehensive guide**: [`BENCHMARKING.md`](crates/litesvm-testing/BENCHMARKING.md) with living documentation approach +- **Enhanced README**: Repositioned as testing + benchmarking platform + +### Technical Improvements + +- Fixed percentile calculation bugs that showed incorrect variance +- Removed automatic ComputeBudgetInstruction for measurement transparency +- SVM state accumulation for realistic vs isolated measurements +- Professional logging (quiet by default, optional progress via RUST_LOG) + +### Breaking Changes + +- None - all existing testing functionality preserved +- New benchmarking features require `--features cu_bench` opt-in + ## [0.1.0] - 2025-01-30 ### Added diff --git a/Cargo.lock b/Cargo.lock index cdf544d..9b10a93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1856,7 +1856,7 @@ dependencies = [ [[package]] name = "litesvm-testing" -version = "0.1.1" +version = "0.2.0" dependencies = [ "chrono", "env_logger 0.11.8", @@ -2739,14 +2739,14 @@ checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" [[package]] name = "simple-anchor-program" -version = "0.1.1" +version = "0.2.0" dependencies = [ "anchor-lang", ] [[package]] name = "simple-anchor-tests" -version = "0.1.1" +version = "0.2.0" dependencies = [ "anchor-lang", "litesvm", @@ -2756,7 +2756,7 @@ dependencies = [ [[package]] name = "simple-pinocchio-program" -version = "0.1.1" +version = "0.2.0" dependencies = [ "pinocchio", "pinocchio-log", @@ -2765,7 +2765,7 @@ dependencies = [ [[package]] name = "simple-pinocchio-tests" -version = "0.1.1" +version = "0.2.0" dependencies = [ "litesvm", "litesvm-testing", diff --git a/crates/litesvm-testing/Cargo.toml b/crates/litesvm-testing/Cargo.toml index e5a1bda..dfcf7df 100644 --- a/crates/litesvm-testing/Cargo.toml +++ b/crates/litesvm-testing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "litesvm-testing" -version = "0.1.1" +version = "0.2.0" edition = "2021" authors = ["LiteSVM Testing Framework Contributors"] license = "GPL-3.0-or-later" diff --git a/examples/anchor/simple-anchor-program/Cargo.toml b/examples/anchor/simple-anchor-program/Cargo.toml index 6e17e74..637615a 100644 --- a/examples/anchor/simple-anchor-program/Cargo.toml +++ b/examples/anchor/simple-anchor-program/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-anchor-program" -version = "0.1.1" +version = "0.2.0" edition = "2021" [features] diff --git a/examples/anchor/simple-anchor-tests/Cargo.toml b/examples/anchor/simple-anchor-tests/Cargo.toml index 431768a..10946a9 100644 --- a/examples/anchor/simple-anchor-tests/Cargo.toml +++ b/examples/anchor/simple-anchor-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-anchor-tests" -version = "0.1.1" +version = "0.2.0" edition = "2021" [build-dependencies] diff --git a/examples/pinocchio/simple-pinocchio-program/Cargo.toml b/examples/pinocchio/simple-pinocchio-program/Cargo.toml index 17ad5c8..c9b9ad5 100644 --- a/examples/pinocchio/simple-pinocchio-program/Cargo.toml +++ b/examples/pinocchio/simple-pinocchio-program/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-pinocchio-program" -version = "0.1.1" +version = "0.2.0" edition = "2021" [features] diff --git a/examples/pinocchio/simple-pinocchio-tests/Cargo.toml b/examples/pinocchio/simple-pinocchio-tests/Cargo.toml index 8544498..9cf7137 100644 --- a/examples/pinocchio/simple-pinocchio-tests/Cargo.toml +++ b/examples/pinocchio/simple-pinocchio-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-pinocchio-tests" -version = "0.1.1" +version = "0.2.0" edition = "2021" [build-dependencies]