Skip to content

Commit

Permalink
Make benchmark compile on stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Bathtor committed Mar 20, 2019
1 parent 23e758f commit e9c5f16
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions executor-performance/src/experiment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ use std::default::Default;
use std::thread;
use std::sync::Arc;
use synchronoise::CountdownEvent;

#[cfg(feature = "nightly")]
use test::black_box;

#[cfg(not(feature = "nightly"))]
fn black_box<T>(dummy: T) -> T { dummy }

#[derive(Clone, Debug)]
pub struct ExperimentSettings {
num_threads: usize,
Expand Down
6 changes: 5 additions & 1 deletion executor-performance/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
// <LICENSE or http://opensource.org/licenses/MIT>.
// This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(test)]
#![cfg_attr(feature = "nightly", feature(test))]

#![allow(unused_parens)]
extern crate executors;
extern crate synchronoise;
extern crate time;

#[cfg(feature = "nightly")]
extern crate test;

#[macro_use]
extern crate clap;

Expand Down
4 changes: 2 additions & 2 deletions executor-performance/threadinc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ OUT_LOC="out.csv"
rm $OUT_LOC;
for i in $(seq $MIN_THREADS $MAX_THREADS); do
echo "Run $i starting";
$BIN_LOC -t $i -p $INPAR -m $MSGS -a $AMP -o $OUT_LOC --pre 100 --post 100 --skip-tpe;
$BIN_LOC -t $i -p $INPAR -m $MSGS -a $AMP -o $OUT_LOC --pre 10000 --post 10000 --skip-tpe;
echo "Run $i finished";
done
done

0 comments on commit e9c5f16

Please sign in to comment.