Skip to content
Snippets Groups Projects
Commit 0c119827 authored by Dorian Weber's avatar Dorian Weber
Browse files

Fixed the benchmark code after breaking it when I slightly changed the API.

parent f148ed3e
No related merge requests found
...@@ -106,7 +106,7 @@ mod bench { ...@@ -106,7 +106,7 @@ mod bench {
PlotConfiguration::default() PlotConfiguration::default()
.summary_scale(AxisScale::Logarithmic) .summary_scale(AxisScale::Logarithmic)
); );
group.sampling_mode(SamplingMode::Linear); //group.sampling_mode(SamplingMode::Linear);
//group.measurement_time(Duration::from_secs(300)); //group.measurement_time(Duration::from_secs(300));
if !cfg!(windows) { if !cfg!(windows) {
...@@ -161,7 +161,7 @@ mod bench { ...@@ -161,7 +161,7 @@ mod bench {
}, },
|shared| simcore_rs::simulation( |shared| simcore_rs::simulation(
shared, shared,
|sim| sim.process(barbershop(sim, sim_duration)) |sim| Process::new(sim, barbershop(sim, sim_duration))
), ),
BatchSize::SmallInput BatchSize::SmallInput
) )
......
...@@ -184,8 +184,8 @@ mod bench { ...@@ -184,8 +184,8 @@ mod bench {
PlotConfiguration::default() PlotConfiguration::default()
.summary_scale(AxisScale::Logarithmic) .summary_scale(AxisScale::Logarithmic)
); );
group.sampling_mode(SamplingMode::Linear); //group.sampling_mode(SamplingMode::Linear);
group.measurement_time(Duration::from_secs(600)); //group.measurement_time(Duration::from_secs(600));
if !cfg!(windows) { if !cfg!(windows) {
println!("Not running under Windows, skipping SLX benchmarks!"); println!("Not running under Windows, skipping SLX benchmarks!");
...@@ -243,7 +243,8 @@ mod bench { ...@@ -243,7 +243,8 @@ mod bench {
}, },
|shared| simcore_rs::simulation( |shared| simcore_rs::simulation(
shared, shared,
|sim| sim.process( |sim| Process::new(
sim,
ferry(sim, sim_duration, FERRY_COUNT, HARBOR_COUNT) ferry(sim, sim_duration, FERRY_COUNT, HARBOR_COUNT)
) )
), ),
......
...@@ -180,7 +180,7 @@ mod bench { ...@@ -180,7 +180,7 @@ mod bench {
.summary_scale(AxisScale::Logarithmic) .summary_scale(AxisScale::Logarithmic)
); );
//group.sampling_mode(SamplingMode::Linear); //group.sampling_mode(SamplingMode::Linear);
group.measurement_time(Duration::from_secs(900)); //group.measurement_time(Duration::from_secs(900));
if !cfg!(windows) { if !cfg!(windows) {
println!("Not running under Windows, skipping SLX benchmarks!"); println!("Not running under Windows, skipping SLX benchmarks!");
......
...@@ -60,7 +60,7 @@ pub fn slx_bench(program: &str, arguments: &[&str], iterations: usize) -> Result ...@@ -60,7 +60,7 @@ pub fn slx_bench(program: &str, arguments: &[&str], iterations: usize) -> Result
(1..) (1..)
.map(|i| iterations >> i) .map(|i| iterations >> i)
.take_while(|&chunk_size| chunk_size > 0) .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| { .map(|chunk_size| {
(0..(iterations - 1)/chunk_size) (0..(iterations - 1)/chunk_size)
.map(|_| chunk_size) .map(|_| chunk_size)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment