Skip to content

Commit

Permalink
fix: leverage zksync home to fetch benchmark paths (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
fkrause98 authored Aug 28, 2024
1 parent 67d2d32 commit 8dca5a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/tests/vm-benchmark/benches/criterion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ use zksync_vm_benchmark_harness::{
};

const SAMPLE_SIZE: usize = 20;
const ZKSYNC_HOME: &str = std::env!("ZKSYNC_HOME");

fn benches_in_folder<VM: BenchmarkingVmFactory, const FULL: bool>(c: &mut Criterion) {
let mut group = c.benchmark_group(VM::LABEL.as_str());
group
.sample_size(SAMPLE_SIZE)
.measurement_time(Duration::from_secs(10));

for path in std::fs::read_dir("deployment_benchmarks").unwrap() {
let benches = format!("{}/core/tests/vm-benchmark/deployment_benchmarks", ZKSYNC_HOME);

for path in std::fs::read_dir(&benches).unwrap() {
let path = path.unwrap().path();

let test_contract = std::fs::read(&path).expect("failed to read file");
Expand Down

0 comments on commit 8dca5a6

Please sign in to comment.