- Timestamp:
- Sep 13, 2021, 1:19:53 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 56e5b24
- Parents:
- d0b9247
- Location:
- benchmark
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/Cargo.toml.in
rd0b9247 r821c534 12 12 name = "rdq-locality-tokio" 13 13 path = "@abs_srcdir@/readyQ/locality.rs" 14 15 [[bin]] 16 name = "rdq-transfer-tokio" 17 path = "@abs_srcdir@/readyQ/transfer.rs" 14 18 15 19 [[bin]] -
benchmark/Makefile.am
rd0b9247 r821c534 600 600 rdq-locality-go \ 601 601 rdq-locality-fibre \ 602 rdq-transfer-cfa 602 rdq-transfer-cfa \ 603 rdq-transfer-tokio 603 604 604 605 rdq-benches: -
benchmark/bench.rs
rd0b9247 r821c534 1 1 use std::io::{self, Write}; 2 use std::option; 2 3 use std::sync::atomic::{AtomicU64, AtomicBool, Ordering}; 3 4 use std::time::{Instant,Duration}; 5 use std::u128; 4 6 5 7 use clap::{Arg, ArgMatches}; … … 27 29 28 30 impl BenchData { 29 pub fn new(options: ArgMatches, nthreads: usize ) -> BenchData {31 pub fn new(options: ArgMatches, nthreads: usize, default_it: option::Option<u64>) -> BenchData { 30 32 let (clock_mode, stop_count, duration) = if options.is_present("iterations") { 31 33 (false, 32 34 options.value_of("iterations").unwrap().parse::<u64>().unwrap(), 35 -1.0) 36 } else if !default_it.is_none() { 37 (false, 38 default_it.unwrap(), 33 39 -1.0) 34 40 } else { … … 48 54 } 49 55 56 #[allow(dead_code)] 50 57 pub async fn wait(&self, start: &Instant) -> Duration{ 51 58 loop { … … 69 76 } 70 77 78 // ================================================== 79 pub fn _lehmer64( state: &mut u128 ) -> u64 { 80 *state = state.wrapping_mul(0xda942042e4dd58b5); 81 return (*state >> 64) as u64; 82 } -
benchmark/readyQ/cycle.rs
rd0b9247 r821c534 46 46 47 47 let tthreads = nthreads * ring_size; 48 let exp = Arc::new(bench::BenchData::new(options, tthreads ));48 let exp = Arc::new(bench::BenchData::new(options, tthreads, None)); 49 49 50 50 let s = (1000000 as u64).to_formatted_string(&Locale::en); -
benchmark/readyQ/locality.rs
rd0b9247 r821c534 285 285 assert_eq!(&s, "1,000,000"); 286 286 287 let exp = Arc::new(bench::BenchData::new(options, nprocs ));287 let exp = Arc::new(bench::BenchData::new(options, nprocs, None)); 288 288 let mut results = Result::new(); 289 289 -
benchmark/readyQ/yield.rs
rd0b9247 r821c534 44 44 let nprocs = options.value_of("nprocs").unwrap().parse::<usize>().unwrap(); 45 45 46 let exp = Arc::new(bench::BenchData::new(options, nthreads ));46 let exp = Arc::new(bench::BenchData::new(options, nthreads, None)); 47 47 48 48 let s = (1000000 as u64).to_formatted_string(&Locale::en); … … 50 50 51 51 let thddata : Arc<Vec<Arc<Yielder>>> = Arc::new( 52 (0..nthreads).map(|i| { 53 let pi = (i + nthreads) % nthreads; 52 (0..nthreads).map(|_i| { 54 53 Arc::new(Yielder{ 55 54 sem: sync::Semaphore::new(0),
Note: See TracChangeset
for help on using the changeset viewer.