dscale 0.6.0

A fast & deterministic simulation framework for benchmarking and testing distributed systems
Documentation
/// Represents how many threads will workers use to run steps in parallel.
pub enum Threads {
    /// Thread number that will match number of cores on your machine.
    MatchCores,
    /// Specific number of threads.
    Specific(usize),
}

impl Into<usize> for Threads {
    fn into(self) -> usize {
        match self {
            Threads::MatchCores => {
                std::thread::available_parallelism()
                    .expect("could not acquire machine core number")
                    .get()
                    - 1 // One core for coordinator, other for workers
            }
            Threads::Specific(number) => number,
        }
    }
}