Show unused parameters in command names

closes #600
This commit is contained in:
David Peter authored and David Peter committed 2023-04-20 21:39:23 +02:00
1 parent 4b9cd06d86
commit a8752769ab
11 files changed
+85 -10

No files matched your search

+4
View File
@@ -94,6 +94,7 @@ fn test_asciidoc_format_s() {
let results = vec![
BenchmarkResult {
command: String::from("FOO=1 BAR=2 command | 1"),
command_with_unused_parameters: String::from("FOO=1 BAR=2 command | 1"),
mean: 1.0,
stddev: Some(2.0),
median: 1.0,
@@ -112,6 +113,7 @@ fn test_asciidoc_format_s() {
},
BenchmarkResult {
command: String::from("FOO=1 BAR=7 command | 2"),
command_with_unused_parameters: String::from("FOO=1 BAR=7 command | 2"),
mean: 11.0,
stddev: Some(12.0),
median: 11.0,
@@ -163,6 +165,7 @@ fn test_asciidoc_format_ms() {
let results = vec![
BenchmarkResult {
command: String::from("FOO=1 BAR=7 command | 2"),
command_with_unused_parameters: String::from("FOO=1 BAR=7 command | 2"),
mean: 0.011,
stddev: Some(0.012),
median: 0.011,
@@ -181,6 +184,7 @@ fn test_asciidoc_format_ms() {
},
BenchmarkResult {
command: String::from("FOO=1 BAR=2 command | 1"),
command_with_unused_parameters: String::from("FOO=1 BAR=2 command | 1"),
mean: 1.0,
stddev: Some(2.0),
median: 1.0,
+2
View File
@@ -62,6 +62,7 @@ fn test_csv() {
let results = vec![
BenchmarkResult {
command: String::from("FOO=one BAR=two command | 1"),
command_with_unused_parameters: String::from("FOO=one BAR=two command | 1"),
mean: 1.0,
stddev: Some(2.0),
median: 1.0,
@@ -80,6 +81,7 @@ fn test_csv() {
},
BenchmarkResult {
command: String::from("FOO=one BAR=seven command | 2"),
command_with_unused_parameters: String::from("FOO=one BAR=seven command | 2"),
mean: 11.0,
stddev: Some(12.0),
median: 11.0,
+8
View File
@@ -71,6 +71,7 @@ fn test_markdown_format_ms() {
let timing_results = vec![
BenchmarkResult {
command: String::from("sleep 0.1"),
command_with_unused_parameters: String::from("sleep 0.1"),
mean: 0.1057,
stddev: Some(0.0016),
median: 0.1057,
@@ -84,6 +85,7 @@ fn test_markdown_format_ms() {
},
BenchmarkResult {
command: String::from("sleep 2"),
command_with_unused_parameters: String::from("sleep 2"),
mean: 2.0050,
stddev: Some(0.0020),
median: 2.0050,
@@ -121,6 +123,7 @@ fn test_markdown_format_s() {
let timing_results = vec![
BenchmarkResult {
command: String::from("sleep 2"),
command_with_unused_parameters: String::from("sleep 2"),
mean: 2.0050,
stddev: Some(0.0020),
median: 2.0050,
@@ -134,6 +137,7 @@ fn test_markdown_format_s() {
},
BenchmarkResult {
command: String::from("sleep 0.1"),
command_with_unused_parameters: String::from("sleep 0.1"),
mean: 0.1057,
stddev: Some(0.0016),
median: 0.1057,
@@ -171,6 +175,7 @@ fn test_markdown_format_time_unit_s() {
let timing_results = vec![
BenchmarkResult {
command: String::from("sleep 0.1"),
command_with_unused_parameters: String::from("sleep 0.1"),
mean: 0.1057,
stddev: Some(0.0016),
median: 0.1057,
@@ -184,6 +189,7 @@ fn test_markdown_format_time_unit_s() {
},
BenchmarkResult {
command: String::from("sleep 2"),
command_with_unused_parameters: String::from("sleep 2"),
mean: 2.0050,
stddev: Some(0.0020),
median: 2.0050,
@@ -227,6 +233,7 @@ fn test_markdown_format_time_unit_ms() {
let timing_results = vec![
BenchmarkResult {
command: String::from("sleep 2"),
command_with_unused_parameters: String::from("sleep 2"),
mean: 2.0050,
stddev: Some(0.0020),
median: 2.0050,
@@ -240,6 +247,7 @@ fn test_markdown_format_time_unit_ms() {
},
BenchmarkResult {
command: String::from("sleep 0.1"),
command_with_unused_parameters: String::from("sleep 0.1"),
mean: 0.1057,
stddev: Some(0.0016),
median: 0.1057,
+11 -1
View File
@@ -43,7 +43,9 @@ pub trait MarkupExporter {
for entry in entries {
let measurement = &entry.result;
// prepare data row strings
let cmd_str = measurement.command.replace('|', "\\|");
let cmd_str = measurement
.command_with_unused_parameters
.replace('|', "\\|");
let mean_str = format_duration_value(measurement.mean, Some(unit)).0;
let stddev_str = if let Some(stddev) = measurement.stddev {
format!(" ± {}", format_duration_value(stddev, Some(unit)).0)
@@ -119,6 +121,7 @@ fn test_determine_unit_from_results_unit_given_s() {
let results = vec![
BenchmarkResult {
command: String::from("sleep 2"),
command_with_unused_parameters: String::from("sleep 2"),
mean: 2.0050,
stddev: Some(0.0020),
median: 2.0050,
@@ -132,6 +135,7 @@ fn test_determine_unit_from_results_unit_given_s() {
},
BenchmarkResult {
command: String::from("sleep 0.1"),
command_with_unused_parameters: String::from("sleep 0.1"),
mean: 0.1057,
stddev: Some(0.0016),
median: 0.1057,
@@ -159,6 +163,7 @@ fn test_determine_unit_from_results_unit_given_ms() {
let results = vec![
BenchmarkResult {
command: String::from("sleep 2"),
command_with_unused_parameters: String::from("sleep 2"),
mean: 2.0050,
stddev: Some(0.0020),
median: 2.0050,
@@ -172,6 +177,7 @@ fn test_determine_unit_from_results_unit_given_ms() {
},
BenchmarkResult {
command: String::from("sleep 0.1"),
command_with_unused_parameters: String::from("sleep 0.1"),
mean: 0.1057,
stddev: Some(0.0016),
median: 0.1057,
@@ -199,6 +205,7 @@ fn test_determine_unit_from_results_unit_first_s() {
let results = vec![
BenchmarkResult {
command: String::from("sleep 2"),
command_with_unused_parameters: String::from("sleep 2"),
mean: 2.0050,
stddev: Some(0.0020),
median: 2.0050,
@@ -212,6 +219,7 @@ fn test_determine_unit_from_results_unit_first_s() {
},
BenchmarkResult {
command: String::from("sleep 0.1"),
command_with_unused_parameters: String::from("sleep 0.1"),
mean: 0.1057,
stddev: Some(0.0016),
median: 0.1057,
@@ -239,6 +247,7 @@ fn test_determine_unit_from_results_unit_first_ms() {
let results = vec![
BenchmarkResult {
command: String::from("sleep 0.1"),
command_with_unused_parameters: String::from("sleep 0.1"),
mean: 0.1057,
stddev: Some(0.0016),
median: 0.1057,
@@ -252,6 +261,7 @@ fn test_determine_unit_from_results_unit_first_ms() {
},
BenchmarkResult {
command: String::from("sleep 2"),
command_with_unused_parameters: String::from("sleep 2"),
mean: 2.0050,
stddev: Some(0.0020),
median: 2.0050,
+4
View File
@@ -77,6 +77,7 @@ fn test_orgmode_format_ms() {
let results = vec![
BenchmarkResult {
command: String::from("sleep 0.1"),
command_with_unused_parameters: String::from("sleep 0.1"),
mean: 0.1057,
stddev: Some(0.0016),
median: 0.1057,
@@ -90,6 +91,7 @@ fn test_orgmode_format_ms() {
},
BenchmarkResult {
command: String::from("sleep 2"),
command_with_unused_parameters: String::from("sleep 2"),
mean: 2.0050,
stddev: Some(0.0020),
median: 2.0050,
@@ -129,6 +131,7 @@ fn test_orgmode_format_s() {
let results = vec![
BenchmarkResult {
command: String::from("sleep 2"),
command_with_unused_parameters: String::from("sleep 2"),
mean: 2.0050,
stddev: Some(0.0020),
median: 2.0050,
@@ -142,6 +145,7 @@ fn test_orgmode_format_s() {
},
BenchmarkResult {
command: String::from("sleep 0.1"),
command_with_unused_parameters: String::from("sleep 0.1"),
mean: 0.1057,
stddev: Some(0.0016),
median: 0.1057,