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
Provenance
- Commit
b6ca2d6- Tree
961708a- Author
sharkdp <davidpeter@web.de>- Committer
sharkdp <davidpeter@web.de>- Parent
f29bbb5
1 file changed+17 added−15 removed
modified:src/main.rs+17 added-15 removed
40 unmodified lines41 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 lines58 .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 line75 .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();95 96 options.ignore_failure = matches.is_present("ignore-failure");97 96- options.setup_command = matches.value_of("setup").map(String::from);97-98 let str_to_u64 = |n| u64::from_str_radix(n, 10).ok();99 100 options.warmup_count = matches101 .value_of("warmup")4 unmodified lines106 // we need at least two runs to compute a variance107 options.min_runs = cmp::max(2, min_runs);108 }109 110+ options.setup_command = matches.value_of("setup").map(String::from);111+112 let commands = matches.values_of("command").unwrap().collect();113 let res = run(&commands, &options);114 115 match res {4 unmodified lines