Changeset 821c534


Ignore:
Timestamp:
Sep 13, 2021, 1:19:53 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
56e5b24
Parents:
d0b9247
Message:

Implemented transfer in rust and fixed minor issues with rust benchmarks

Location:
benchmark
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • benchmark/Cargo.toml.in

    rd0b9247 r821c534  
    1212name = "rdq-locality-tokio"
    1313path = "@abs_srcdir@/readyQ/locality.rs"
     14
     15[[bin]]
     16name = "rdq-transfer-tokio"
     17path = "@abs_srcdir@/readyQ/transfer.rs"
    1418
    1519[[bin]]
  • benchmark/Makefile.am

    rd0b9247 r821c534  
    600600        rdq-locality-go \
    601601        rdq-locality-fibre \
    602         rdq-transfer-cfa
     602        rdq-transfer-cfa \
     603        rdq-transfer-tokio
    603604
    604605rdq-benches:
  • benchmark/bench.rs

    rd0b9247 r821c534  
    11use std::io::{self, Write};
     2use std::option;
    23use std::sync::atomic::{AtomicU64, AtomicBool, Ordering};
    34use std::time::{Instant,Duration};
     5use std::u128;
    46
    57use clap::{Arg, ArgMatches};
     
    2729
    2830impl BenchData {
    29         pub fn new(options: ArgMatches, nthreads: usize) -> BenchData {
     31        pub fn new(options: ArgMatches, nthreads: usize, default_it: option::Option<u64>) -> BenchData {
    3032                let (clock_mode, stop_count, duration) = if options.is_present("iterations") {
    3133                        (false,
    3234                        options.value_of("iterations").unwrap().parse::<u64>().unwrap(),
     35                        -1.0)
     36                } else if !default_it.is_none() {
     37                        (false,
     38                        default_it.unwrap(),
    3339                        -1.0)
    3440                } else {
     
    4854        }
    4955
     56        #[allow(dead_code)]
    5057        pub async fn wait(&self, start: &Instant) -> Duration{
    5158                loop {
     
    6976}
    7077
     78// ==================================================
     79pub 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  
    4646
    4747        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));
    4949
    5050        let s = (1000000 as u64).to_formatted_string(&Locale::en);
  • benchmark/readyQ/locality.rs

    rd0b9247 r821c534  
    285285        assert_eq!(&s, "1,000,000");
    286286
    287         let exp = Arc::new(bench::BenchData::new(options, nprocs));
     287        let exp = Arc::new(bench::BenchData::new(options, nprocs, None));
    288288        let mut results = Result::new();
    289289
  • benchmark/readyQ/yield.rs

    rd0b9247 r821c534  
    4444        let nprocs    = options.value_of("nprocs").unwrap().parse::<usize>().unwrap();
    4545
    46         let exp = Arc::new(bench::BenchData::new(options, nthreads));
     46        let exp = Arc::new(bench::BenchData::new(options, nthreads, None));
    4747
    4848        let s = (1000000 as u64).to_formatted_string(&Locale::en);
     
    5050
    5151        let thddata : Arc<Vec<Arc<Yielder>>> = Arc::new(
    52                 (0..nthreads).map(|i| {
    53                         let pi = (i + nthreads) % nthreads;
     52                (0..nthreads).map(|_i| {
    5453                        Arc::new(Yielder{
    5554                                sem: sync::Semaphore::new(0),
Note: See TracChangeset for help on using the changeset viewer.