Skip to content
Myr

Clean up help text

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by sharkdp · committed by sharkdp · parent f29bbb5 · Browse files · 1 file+17 added−15 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+17 added−15 removed

  • other:+17 added−15 removed

1 file+17 added−15 removed

modified:src/main.rs+17 added-15 removed
40 unmodified lines
41 let matches = App::new("hyperfine")42 .version(crate_version!())43 .setting(AppSettings::ColoredHelp)44 .setting(AppSettings::DeriveDisplayOrder)45 .setting(AppSettings::UnifiedHelpMessage)46 .max_term_width(90)47 .about("A command-line benchmarking tool")48 .arg(49 Arg::with_name("command")50 .help("Command to benchmark")
7 unmodified lines
58 .short("i")59 .help("Ignore non-zero exit codes"),60 )61 .arg(60 Arg::with_name("setup")61 .long("setup")62 .short("S")63 .takes_value(true)64 .value_name("CMD")65 .help(66 "Execute CMD before each benchmark run. This is useful for \67 clearing disk caches, for example.",68 ),69 )70 .arg(62 Arg::with_name("warmup")63 .long("warmup")64 .short("w")65 .takes_value(true)66 .value_name("NUM")67 .help(68 "Perform NUM warmup runs before the actual benchmark. This can be used \78 to fill (disk) caches for I/O-heavy programs.",69 to fill (disk) caches for I/O-heavy programs",70 ),71 )72 .arg(73 Arg::with_name("min-runs")
1 unmodified line
75 .short("m")76 .takes_value(true)77 .value_name("NUM")78 .help(&format!(88 "Perform at least NUM runs for each command (default: {}).",79 "Perform at least NUM runs for each command (default: {})",80 options.min_runs81 )),82 )83 .arg(84 Arg::with_name("setup")85 .long("setup")86 .short("S")87 .takes_value(true)88 .value_name("CMD")89 .help(90 "Execute CMD before each benchmark run. This is useful for \91 clearing disk caches, for example",92 ),93 )94 .get_matches();9596 options.ignore_failure = matches.is_present("ignore-failure");9796 options.setup_command = matches.value_of("setup").map(String::from);9798 let str_to_u64 = |n| u64::from_str_radix(n, 10).ok();99100 options.warmup_count = matches101 .value_of("warmup")
4 unmodified lines
106 // we need at least two runs to compute a variance107 options.min_runs = cmp::max(2, min_runs);108 }109110 options.setup_command = matches.value_of("setup").map(String::from);111112 let commands = matches.values_of("command").unwrap().collect();113 let res = run(&commands, &options);114115 match res {
4 unmodified lines