Skip to content

Commit

Permalink
Merge pull request #24 from timbeurskens/benchmark-status
Browse files Browse the repository at this point in the history
print benchmark status to stderr
  • Loading branch information
timbeurskens authored Mar 16, 2022
2 parents bf691bf + 796ae31 commit 1448b6f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rsbdd"
version = "0.6.1"
version = "0.6.2"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ fn main() {
let mut exec_times = Vec::new();

// Benchmark: repeat n times and log runtime per iteration
for _ in 0..repeat {
for i in 0..repeat {
let tick = Instant::now();
result = input_parsed.eval();
exec_times.push(tick.elapsed());

eprintln!("finished {}/{} runs", i + 1, repeat);
}

// only print performance results when the benchmark flag is available, and more than 1 run has completed
Expand Down

0 comments on commit 1448b6f

Please sign in to comment.