From b8b8ce25668d70c3b91a338e197a2e7d3d48f83c Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Fri, 21 Jun 2024 14:49:22 +0400 Subject: [PATCH] Add forgotten crate --- Cargo.lock | 24 +++++++++---------- core/tests/vm-benchmark/Cargo.toml | 2 +- .../vm-benchmark/benches/diy_benchmark.rs | 2 +- .../vm-benchmark/src/compare_iai_results.rs | 2 +- .../src/iai_results_to_prometheus.rs | 6 ++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5a0b5aa11a9b..4c1ce00267cf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7126,18 +7126,6 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "vm_benchmark" -version = "0.1.0" -dependencies = [ - "criterion", - "iai", - "metrics-exporter-prometheus", - "tokio", - "vise", - "zksync_vm_benchmark_harness", -] - [[package]] name = "walkdir" version = "2.4.0" @@ -9261,6 +9249,18 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "zksync_vm_benchmark" +version = "0.1.0" +dependencies = [ + "criterion", + "iai", + "metrics-exporter-prometheus", + "tokio", + "vise", + "zksync_vm_benchmark_harness", +] + [[package]] name = "zksync_vm_benchmark_harness" version = "0.1.0" diff --git a/core/tests/vm-benchmark/Cargo.toml b/core/tests/vm-benchmark/Cargo.toml index d3a20a1e8544..385c1fca2281 100644 --- a/core/tests/vm-benchmark/Cargo.toml +++ b/core/tests/vm-benchmark/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "vm_benchmark" +name = "zksync_vm_benchmark" version = "0.1.0" edition.workspace = true license.workspace = true diff --git a/core/tests/vm-benchmark/benches/diy_benchmark.rs b/core/tests/vm-benchmark/benches/diy_benchmark.rs index 1601de5eb85f..b836901c5435 100644 --- a/core/tests/vm-benchmark/benches/diy_benchmark.rs +++ b/core/tests/vm-benchmark/benches/diy_benchmark.rs @@ -32,7 +32,7 @@ fn main() { } if option_env!("PUSH_VM_BENCHMARKS_TO_PROMETHEUS").is_some() { - vm_benchmark::with_prometheus::with_prometheus(|| { + zksync_vm_benchmark::with_prometheus::with_prometheus(|| { for (name, timings) in results { for (i, timing) in timings.into_iter().enumerate() { VM_BENCHMARK_METRICS.timing[&(name.clone(), i.to_string())].set(timing); diff --git a/core/tests/vm-benchmark/src/compare_iai_results.rs b/core/tests/vm-benchmark/src/compare_iai_results.rs index b9b6440704cc..0700028cf79b 100644 --- a/core/tests/vm-benchmark/src/compare_iai_results.rs +++ b/core/tests/vm-benchmark/src/compare_iai_results.rs @@ -4,7 +4,7 @@ use std::{ io::{BufRead, BufReader}, }; -use vm_benchmark::parse_iai::parse_iai; +use zksync_vm_benchmark::parse_iai::parse_iai; fn main() { let [iai_before, iai_after, opcodes_before, opcodes_after] = std::env::args() diff --git a/core/tests/vm-benchmark/src/iai_results_to_prometheus.rs b/core/tests/vm-benchmark/src/iai_results_to_prometheus.rs index d419603bae87..9cafcc0515fe 100644 --- a/core/tests/vm-benchmark/src/iai_results_to_prometheus.rs +++ b/core/tests/vm-benchmark/src/iai_results_to_prometheus.rs @@ -1,13 +1,13 @@ use std::io::BufReader; use vise::{Gauge, LabeledFamily, Metrics}; -use vm_benchmark::parse_iai::IaiResult; +use zksync_vm_benchmark::parse_iai::IaiResult; fn main() { let results: Vec = - vm_benchmark::parse_iai::parse_iai(BufReader::new(std::io::stdin())).collect(); + zksync_vm_benchmark::parse_iai::parse_iai(BufReader::new(std::io::stdin())).collect(); - vm_benchmark::with_prometheus::with_prometheus(|| { + zksync_vm_benchmark::with_prometheus::with_prometheus(|| { for r in results { VM_CACHEGRIND_METRICS.instructions[&r.name.clone()].set(r.instructions as f64); VM_CACHEGRIND_METRICS.l1_accesses[&r.name.clone()].set(r.l1_accesses as f64);