add CLI option to identify a command with a custom name

CLI option `--name` can be used to define the name to identify a
command. If not passed, then the command itself is used. Commands
and names are paired in the same order: The first command executed gets
the first name passed as option.

Close #326
This commit is contained in:
Stéphane Campinas authored and David Peter committed 2020-10-15 22:42:44 +02:00
1 parent 674b5422ab
commit 0f0a109ca0
4 files changed
+27 -2

No files matched your search

+3
View File
@@ -210,11 +210,14 @@ pub struct HyperfineOptions {
/// Which time unit to use for CLI & Markdown output
pub time_unit: Option<Unit>,
pub names: Option<Vec<String>>,
}
impl Default for HyperfineOptions {
fn default() -> HyperfineOptions {
HyperfineOptions {
names: None,
warmup_count: 0,
runs: Runs::default(),
min_time_sec: 3.0,