pub fn new() -> Builder {
        use std::env;

        let checkpoint_interval = env::var("LOOM_CHECKPOINT_INTERVAL")
            .map(|v| {
                v.parse()
                    .ok()
                    .expect("invalid value for `LOOM_CHECKPOINT_INTERVAL`")
            })
            .unwrap_or(20_000);

        let max_branches = env::var("LOOM_MAX_BRANCHES")
            .map(|v| {
                v.parse()
                    .ok()
                    .expect("invalid value for `LOOM_MAX_BRANCHES`")
            })
            .unwrap_or(DEFAULT_MAX_BRANCHES);

        let log = env::var("LOOM_LOG").is_ok();

        let max_duration = env::var("LOOM_MAX_DURATION")
            .map(|v| {
                let secs = v
                    .parse()
                    .ok()
                    .expect("invalid value for `LOOM_MAX_DURATION`");
                Duration::from_secs(secs)
            })
            .ok();

        let max_permutations = env::var("LOOM_MAX_PERMUTATIONS")
            .map(|v| {
                v.parse()
                    .ok()
                    .expect("invalid value for `LOOM_MAX_PERMUTATIONS`")
            })
            .ok();

        let preemption_bound = env::var("LOOM_MAX_PREEMPTIONS")
            .map(|v| {
                v.parse()
                    .ok()
                    .expect("invalid value for `LOOM_MAX_PREEMPTIONS`")
            })
            .ok();

        let checkpoint_file = env::var("LOOM_CHECKPOINT_FILE")
            .map(|v| {
                v.parse()
                    .ok()
                    .expect("invalid value for `LOOM_CHECKPOINT_FILE`")
            })
            .ok();

        Builder {
            max_threads: DEFAULT_MAX_THREADS,
            max_memory: DEFAULT_MAX_MEMORY,
            max_branches,
            max_duration,
            max_permutations,
            preemption_bound,
            checkpoint_file,
            checkpoint_interval,
            log,
            _p: (),
        }
    }
/// Create a new `Builder` instance with default values.
Create a new `Builder` instance with default values.
Create a new ` Builder ` instance with default values .
pub fn new() -> Builder {
        use std::env;
        let checkpoint_interval = env::var("LOOM_CHECKPOINT_INTERVAL")
            .map(|v| {
                v.parse()
                    .ok()
                    .expect("invalid value for `LOOM_CHECKPOINT_INTERVAL`")
            })
            .unwrap_or(20_000);
        let max_branches = env::var("LOOM_MAX_BRANCHES")
            .map(|v| {
                v.parse()
                    .ok()
                    .expect("invalid value for `LOOM_MAX_BRANCHES`")
            })
            .unwrap_or(DEFAULT_MAX_BRANCHES);
        let log = env::var("LOOM_LOG").is_ok();
        let max_duration = env::var("LOOM_MAX_DURATION")
            .map(|v| {
                let secs = v
                    .parse()
                    .ok()
                    .expect("invalid value for `LOOM_MAX_DURATION`");
                Duration::from_secs(secs)
            })
            .ok();
        let max_permutations = env::var("LOOM_MAX_PERMUTATIONS")
            .map(|v| {
                v.parse()
                    .ok()
                    .expect("invalid value for `LOOM_MAX_PERMUTATIONS`")
            })
            .ok();
        let preemption_bound = env::var("LOOM_MAX_PREEMPTIONS")
            .map(|v| {
                v.parse()
                    .ok()
                    .expect("invalid value for `LOOM_MAX_PREEMPTIONS`")
            })
            .ok();
        let checkpoint_file = env::var("LOOM_CHECKPOINT_FILE")
            .map(|v| {
                v.parse()
                    .ok()
                    .expect("invalid value for `LOOM_CHECKPOINT_FILE`")
            })
            .ok();
        Builder {
            max_threads: DEFAULT_MAX_THREADS,
            max_memory: DEFAULT_MAX_MEMORY,
            max_branches,
            max_duration,
            max_permutations,
            preemption_bound,
            checkpoint_file,
            checkpoint_interval,
            log,
            _p: (),
        }
    }
pub fn new ( ) -> Builder { use std :: env ; let checkpoint_interval = env :: var ( " " ) . map ( | v | { v . parse ( ) . ok ( ) . expect ( " " ) } ) . unwrap_or ( 20_000 ) ; let max_branches = env :: var ( " " ) . map ( | v | { v . parse ( ) . ok ( ) . expect ( " " ) } ) . unwrap_or ( DEFAULT_MAX_BRANCHES ) ; let log = env :: var ( " " ) . is_ok ( ) ; let max_duration = env :: var ( " " ) . map ( | v | { let secs = v . parse ( ) . ok ( ) . expect ( " " ) ; Duration :: from_secs ( secs ) } ) . ok ( ) ; let max_permutations = env :: var ( " " ) . map ( | v | { v . parse ( ) . ok ( ) . expect ( " " ) } ) . ok ( ) ; let preemption_bound = env :: var ( " " ) . map ( | v | { v . parse ( ) . ok ( ) . expect ( " " ) } ) . ok ( ) ; let checkpoint_file = env :: var ( " " ) . map ( | v | { v . parse ( ) . ok ( ) . expect ( " " ) } ) . ok ( ) ; Builder { max_threads : DEFAULT_MAX_THREADS , max_memory : DEFAULT_MAX_MEMORY , max_branches , max_duration , max_permutations , preemption_bound , checkpoint_file , checkpoint_interval , log , _p : ( ) , } }
Create a new `Builder` instance with default values.
Create a new ` Builder ` instance with default values .