From cd35ad8f45e97e8e8593685b1edb081af05f7937 Mon Sep 17 00:00:00 2001 From: Markus Date: Fri, 26 Jan 2024 08:24:02 +0100 Subject: [PATCH] Remove criterion and benchmarks Currently not used, so removed for now --- Cargo.toml | 9 +-------- benches/benchmarks.rs | 23 ----------------------- src/tui/ui.rs | 1 - 3 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 benches/benchmarks.rs diff --git a/Cargo.toml b/Cargo.toml index 57e0dbe0c..941f25684 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ crossterm = "0.27.0" tokio = { version = "1.32.0", features = ["sync", "rt"] } ndarray-csv = "0.5.2" rawpointer = "0.2.1" -argmin = { version = "0.8.1", features = [] } +argmin = { version = "0.9.0", features = [] } itertools = "0.12.0" faer-core = { version = "0.15.0", features = [] } # faer-lu = "0.9" @@ -49,13 +49,6 @@ tracing-subscriber = { version = "0.3.17", features = ["env-filter", "fmt", "tim chrono = "0.4" config = "0.13" -[dev-dependencies] -criterion = "0.5" - -[[bench]] -name = "benchmarks" -harness = false - [profile.release] codegen-units = 1 opt-level = 3 diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs deleted file mode 100644 index c39212c87..000000000 --- a/benches/benchmarks.rs +++ /dev/null @@ -1,23 +0,0 @@ -use criterion::{black_box, criterion_group, criterion_main, Criterion}; - -/// Benchmark the Sobol initialization routine using 1000 points in 10 dimensions -fn benchmark_sobol(c: &mut Criterion) { - c.bench_function("sobol", |b| { - b.iter(|| { - let _ = npcore::routines::initialization::sobol::generate( - black_box(1000), - black_box(&vec![(0.0, 1.0); 10]), - black_box(22), - ); - }); - }); -} - -criterion_group! { - name = benches; - config = Criterion::default() - .measurement_time(std::time::Duration::from_secs(10)) // Measure for 10 seconds - .noise_threshold(0.10); // Performance changes less than 10% will be ignored - targets = benchmark_sobol -} -criterion_main!(benches); diff --git a/src/tui/ui.rs b/src/tui/ui.rs index a8b6b2017..9a4340604 100644 --- a/src/tui/ui.rs +++ b/src/tui/ui.rs @@ -111,7 +111,6 @@ pub fn start_ui(mut rx: UnboundedReceiver, settings: Settings) -> Result<( // Exit alternate screen, and print one last frame - execute!( terminal.backend_mut(), crossterm::terminal::LeaveAlternateScreen