From 0c11982730f1823edf3706a61024b3010a8977e2 Mon Sep 17 00:00:00 2001 From: Dorian Weber <weber@informatik.hu-berlin.de> Date: Thu, 11 Feb 2021 23:58:49 +0100 Subject: [PATCH] Fixed the benchmark code after breaking it when I slightly changed the API. --- examples/barbershop.rs | 4 ++-- examples/ferry.rs | 7 ++++--- examples/philosophers.rs | 2 +- examples/slx/mod.rs | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/barbershop.rs b/examples/barbershop.rs index 1535451..20e1d03 100644 --- a/examples/barbershop.rs +++ b/examples/barbershop.rs @@ -106,7 +106,7 @@ mod bench { PlotConfiguration::default() .summary_scale(AxisScale::Logarithmic) ); - group.sampling_mode(SamplingMode::Linear); + //group.sampling_mode(SamplingMode::Linear); //group.measurement_time(Duration::from_secs(300)); if !cfg!(windows) { @@ -161,7 +161,7 @@ mod bench { }, |shared| simcore_rs::simulation( shared, - |sim| sim.process(barbershop(sim, sim_duration)) + |sim| Process::new(sim, barbershop(sim, sim_duration)) ), BatchSize::SmallInput ) diff --git a/examples/ferry.rs b/examples/ferry.rs index da4ea77..ac8dade 100644 --- a/examples/ferry.rs +++ b/examples/ferry.rs @@ -184,8 +184,8 @@ mod bench { PlotConfiguration::default() .summary_scale(AxisScale::Logarithmic) ); - group.sampling_mode(SamplingMode::Linear); - group.measurement_time(Duration::from_secs(600)); + //group.sampling_mode(SamplingMode::Linear); + //group.measurement_time(Duration::from_secs(600)); if !cfg!(windows) { println!("Not running under Windows, skipping SLX benchmarks!"); @@ -243,7 +243,8 @@ mod bench { }, |shared| simcore_rs::simulation( shared, - |sim| sim.process( + |sim| Process::new( + sim, ferry(sim, sim_duration, FERRY_COUNT, HARBOR_COUNT) ) ), diff --git a/examples/philosophers.rs b/examples/philosophers.rs index 388668b..df1d7d3 100644 --- a/examples/philosophers.rs +++ b/examples/philosophers.rs @@ -180,7 +180,7 @@ mod bench { .summary_scale(AxisScale::Logarithmic) ); //group.sampling_mode(SamplingMode::Linear); - group.measurement_time(Duration::from_secs(900)); + //group.measurement_time(Duration::from_secs(900)); if !cfg!(windows) { println!("Not running under Windows, skipping SLX benchmarks!"); diff --git a/examples/slx/mod.rs b/examples/slx/mod.rs index b499a10..f38c7cd 100644 --- a/examples/slx/mod.rs +++ b/examples/slx/mod.rs @@ -60,7 +60,7 @@ pub fn slx_bench(program: &str, arguments: &[&str], iterations: usize) -> Result (1..) .map(|i| iterations >> i) .take_while(|&chunk_size| chunk_size > 0) - .inspect(|chunk_size| println!("reducing the chunk size to {}", chunk_size)) + // .inspect(|chunk_size| println!("reducing the chunk size to {}", chunk_size)) .map(|chunk_size| { (0..(iterations - 1)/chunk_size) .map(|_| chunk_size) -- GitLab