diff --git a/Cargo.lock b/Cargo.lock index b22df0b..5b82e30 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -164,9 +164,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.26" +version = "4.5.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8eb5e908ef3a6efbe1ed62520fb7287959888c88485abe072543190ecc66783" +checksum = "ed93b9805f8ba930df42c2590f05453d5ec36cbb85d018868a5b24d31f6ac000" dependencies = [ "clap_builder", "clap_derive", @@ -174,9 +174,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.26" +version = "4.5.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b01801b5fc6a0a232407abc821660c9c6d25a1cafc0d4f85f29fb8d9afc121" +checksum = "379026ff283facf611b0ea629334361c4211d1b12ee01024eec1591133b04120" dependencies = [ "anstream", "anstyle", @@ -186,9 +186,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.24" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" dependencies = [ "heck", "proc-macro2", @@ -210,25 +210,22 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "criterion" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +checksum = "3bf7af66b0989381bd0be551bd7cc91912a655a58c6918420c9527b1fd8b4679" dependencies = [ "anes", "cast", "ciborium", "clap", "criterion-plot", - "is-terminal", - "itertools", + "itertools 0.13.0", "num-traits", - "once_cell", "oorandom", "plotters", "rayon", "regex", "serde", - "serde_derive", "serde_json", "tinytemplate", "walkdir", @@ -241,7 +238,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" dependencies = [ "cast", - "itertools", + "itertools 0.10.5", ] [[package]] @@ -336,29 +333,12 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" - [[package]] name = "humantime" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" -[[package]] -name = "is-terminal" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "is_ci" version = "1.2.0" @@ -380,6 +360,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.14" @@ -432,9 +421,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "miette" -version = "7.4.0" +version = "7.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317f146e2eb7021892722af37cf1b971f0a70c8406f487e24952667616192c64" +checksum = "5f98efec8807c63c752b5bd61f862c165c115b0a35685bdcfd9238c7aeb592b7" dependencies = [ "backtrace", "backtrace-ext", @@ -446,15 +435,14 @@ dependencies = [ "supports-unicode", "terminal_size", "textwrap", - "thiserror", "unicode-width", ] [[package]] name = "miette-derive" -version = "7.4.0" +version = "7.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c9b935fbe1d6cbd1dac857b54a688145e2d93f48db36010514d0f612d0ad67" +checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b" dependencies = [ "proc-macro2", "quote", @@ -764,26 +752,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "tinytemplate" version = "1.2.1" diff --git a/Cargo.toml b/Cargo.toml index d543e0f..9fb9cbd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,9 +18,9 @@ all = { level = "warn", priority = -1 } pedantic = { level = "warn", priority = -1 } [dependencies] -clap = { version = "4.5.26", features = ["derive"] } -criterion = "0.5.1" -miette = { version = "7.2.0", features = ["fancy"] } +clap = { version = "4.5.38", features = ["derive"] } +criterion = "0.6.0" +miette = { version = "7.6.0", features = ["fancy"] } openvino = { git = "https://github.com/Rickvanderveen/openvino-rs.git", rev = "eef188a4f0fd52020bfe95822ead35f37ee4efaf", features = [ "runtime-linking", ] } diff --git a/src/benchmark.rs b/src/benchmark.rs index 9f4e38a..4791eda 100644 --- a/src/benchmark.rs +++ b/src/benchmark.rs @@ -1,6 +1,6 @@ use std::path::Path; -use criterion::{black_box, Criterion}; +use criterion::Criterion; use miette::{miette, Context, IntoDiagnostic, Result}; use openvino::CompiledModel; @@ -30,7 +30,7 @@ pub fn run_benchmark_onnx(path: impl AsRef, c: &mut Criterion) -> Result<( .create_infer_request() .expect("failed to create inference request"); - black_box(request) + std::hint::black_box(request) .infer() .expect("failed to complete inference"); }); diff --git a/src/main.rs b/src/main.rs index bc2ab58..374af28 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,12 +21,15 @@ fn main() -> miette::Result<()> { let model_path = args.model_path; if !model_path.exists() { - eprintln!("Model file not found: {model_path:?}"); + eprintln!("Model file not found: {}", model_path.display()); std::process::exit(1); } let Some(model_path_str) = model_path.to_str() else { - eprintln!("Model file path is not valid UTF-8: {model_path:?}"); + eprintln!( + "Model file path is not valid UTF-8: {}", + model_path.display() + ); std::process::exit(1); };