mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-02 17:11:28 +00:00
Rename num
This commit is contained in:
1 parent
fa2eaaac5f
commit
4cfccf1168
1 file changed
+5
-5
@@ -181,9 +181,9 @@ impl<'a> Scheduler<'a> {
|
|||||||
self.options.command_output_policy,
|
self.options.command_output_policy,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
for (num, cmd) in self.commands.iter().enumerate() {
|
for (benchmark_number, cmd) in self.commands.iter().enumerate() {
|
||||||
self.results
|
self.results
|
||||||
.push(self.run_benchmark(num, cmd, shell_spawning_time)?);
|
.push(self.run_benchmark(benchmark_number, cmd, shell_spawning_time)?);
|
||||||
|
|
||||||
// We export (all results so far) after each individual benchmark, because
|
// We export (all results so far) after each individual benchmark, because
|
||||||
// we would risk losing all results if a later benchmark fails.
|
// we would risk losing all results if a later benchmark fails.
|
||||||
@@ -304,7 +304,7 @@ impl<'a> Scheduler<'a> {
|
|||||||
/// Run the benchmark for a single shell command
|
/// Run the benchmark for a single shell command
|
||||||
pub fn run_benchmark(
|
pub fn run_benchmark(
|
||||||
&self,
|
&self,
|
||||||
num: usize,
|
benchmark_number: usize,
|
||||||
cmd: &Command<'_>,
|
cmd: &Command<'_>,
|
||||||
shell_spawning_time: TimingResult,
|
shell_spawning_time: TimingResult,
|
||||||
) -> Result<BenchmarkResult> {
|
) -> Result<BenchmarkResult> {
|
||||||
@@ -313,7 +313,7 @@ impl<'a> Scheduler<'a> {
|
|||||||
println!(
|
println!(
|
||||||
"{}{}: {}",
|
"{}{}: {}",
|
||||||
"Benchmark ".bold(),
|
"Benchmark ".bold(),
|
||||||
(num + 1).to_string().bold(),
|
(benchmark_number + 1).to_string().bold(),
|
||||||
command_name,
|
command_name,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -328,7 +328,7 @@ impl<'a> Scheduler<'a> {
|
|||||||
let preparation_command = if values.len() == 1 {
|
let preparation_command = if values.len() == 1 {
|
||||||
&values[0]
|
&values[0]
|
||||||
} else {
|
} else {
|
||||||
&values[num]
|
&values[benchmark_number]
|
||||||
};
|
};
|
||||||
Command::new_parametrized(
|
Command::new_parametrized(
|
||||||
None,
|
None,
|
||||||
|
|||||||
Reference in new issue
Block a user