Crates.io | energy-bench |
lib.rs | energy-bench |
version | 0.1.32 |
created_at | 2024-05-06 08:38:28.868456+00 |
updated_at | 2025-09-03 13:32:25.650535+00 |
description | Methods for benchmarking the energy consumption of programs. |
homepage | |
repository | https://gitlab.com/software-energy-lab/energy-benchmarking |
max_upload_size | |
id | 1230986 |
size | 114,590 |
Tool for benchmarking the energy consumption of programs.
Idle energy consumption, as well as energy consumed by data generation and cleanup, are not subtracted from the results.
A new benchmark builder is created with EnergyBenchBuilder::new()
.
Check out the energy-benchmarking-example project for a few examples.
Some programs are too short-running to provide accurate energy measurements.
To avoid this, the benchmark can be repeated until a given amount of time has passed: set_min_measurement_duration
.
By default, benchmarks are run for at least 100ms.