mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Remove alternative constructors
This commit is contained in:
1 parent
f57c4e6d78
commit
3494c8abe6
8 files changed
+112
-113
No files matched your search
+73
-73
@@ -3,7 +3,7 @@ use crate::benchmark::benchmark_result::BenchmarkResult;
|
||||
use crate::benchmark::measurement::{Measurement, Measurements};
|
||||
use crate::export::asciidoc::AsciidocExporter;
|
||||
use crate::export::orgmode::OrgmodeExporter;
|
||||
use crate::quantity::{Information, InformationQuantity, Time, TimeQuantity};
|
||||
use crate::quantity::{byte, second, Information, Time, TimeQuantity};
|
||||
use crate::util::units::TimeUnit;
|
||||
use crate::{export::markdown::MarkdownExporter, options::SortOrder};
|
||||
use std::collections::BTreeMap;
|
||||
@@ -31,24 +31,24 @@ fn test_markup_export_auto_ms() {
|
||||
command: String::from("sleep 0.1"),
|
||||
measurements: Measurements::new(vec![
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(0.09),
|
||||
time_user: Time::from_seconds(0.09),
|
||||
time_wall_clock: Time::new::<second>(0.09),
|
||||
time_user: Time::new::<second>(0.09),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(0.10),
|
||||
time_user: Time::from_seconds(0.10),
|
||||
time_wall_clock: Time::new::<second>(0.10),
|
||||
time_user: Time::new::<second>(0.10),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(0.14),
|
||||
time_user: Time::from_seconds(0.14),
|
||||
time_wall_clock: Time::new::<second>(0.14),
|
||||
time_user: Time::new::<second>(0.14),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
]),
|
||||
@@ -58,24 +58,24 @@ fn test_markup_export_auto_ms() {
|
||||
command: String::from("sleep 2"),
|
||||
measurements: Measurements::new(vec![
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(2.0),
|
||||
time_user: Time::from_seconds(2.0),
|
||||
time_wall_clock: Time::new::<second>(2.0),
|
||||
time_user: Time::new::<second>(2.0),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(3.0),
|
||||
time_user: Time::from_seconds(3.0),
|
||||
time_wall_clock: Time::new::<second>(3.0),
|
||||
time_user: Time::new::<second>(3.0),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(4.0),
|
||||
time_user: Time::from_seconds(4.0),
|
||||
time_wall_clock: Time::new::<second>(4.0),
|
||||
time_user: Time::new::<second>(4.0),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
]),
|
||||
@@ -130,24 +130,24 @@ fn test_markup_export_auto_s() {
|
||||
command: String::from("sleep 2"),
|
||||
measurements: Measurements::new(vec![
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(2.1),
|
||||
time_user: Time::from_seconds(2.1),
|
||||
time_wall_clock: Time::new::<second>(2.1),
|
||||
time_user: Time::new::<second>(2.1),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(2.2),
|
||||
time_user: Time::from_seconds(2.2),
|
||||
time_wall_clock: Time::new::<second>(2.2),
|
||||
time_user: Time::new::<second>(2.2),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(2.3),
|
||||
time_user: Time::from_seconds(2.3),
|
||||
time_wall_clock: Time::new::<second>(2.3),
|
||||
time_user: Time::new::<second>(2.3),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
]),
|
||||
@@ -157,24 +157,24 @@ fn test_markup_export_auto_s() {
|
||||
command: String::from("sleep 0.1"),
|
||||
measurements: Measurements::new(vec![
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(0.1),
|
||||
time_user: Time::from_seconds(0.1),
|
||||
time_wall_clock: Time::new::<second>(0.1),
|
||||
time_user: Time::new::<second>(0.1),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(0.2),
|
||||
time_user: Time::from_seconds(0.2),
|
||||
time_wall_clock: Time::new::<second>(0.2),
|
||||
time_user: Time::new::<second>(0.2),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(0.3),
|
||||
time_user: Time::from_seconds(0.3),
|
||||
time_wall_clock: Time::new::<second>(0.3),
|
||||
time_user: Time::new::<second>(0.3),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
]),
|
||||
@@ -229,24 +229,24 @@ fn test_markup_export_manual_ms() {
|
||||
command: String::from("sleep 2"),
|
||||
measurements: Measurements::new(vec![
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(2.1),
|
||||
time_user: Time::from_seconds(2.1),
|
||||
time_wall_clock: Time::new::<second>(2.1),
|
||||
time_user: Time::new::<second>(2.1),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(2.2),
|
||||
time_user: Time::from_seconds(2.2),
|
||||
time_wall_clock: Time::new::<second>(2.2),
|
||||
time_user: Time::new::<second>(2.2),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(2.3),
|
||||
time_user: Time::from_seconds(2.3),
|
||||
time_wall_clock: Time::new::<second>(2.3),
|
||||
time_user: Time::new::<second>(2.3),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
]),
|
||||
@@ -256,24 +256,24 @@ fn test_markup_export_manual_ms() {
|
||||
command: String::from("sleep 0.1"),
|
||||
measurements: Measurements::new(vec![
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(0.1),
|
||||
time_user: Time::from_seconds(0.1),
|
||||
time_wall_clock: Time::new::<second>(0.1),
|
||||
time_user: Time::new::<second>(0.1),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(0.2),
|
||||
time_user: Time::from_seconds(0.2),
|
||||
time_wall_clock: Time::new::<second>(0.2),
|
||||
time_user: Time::new::<second>(0.2),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(0.3),
|
||||
time_user: Time::from_seconds(0.3),
|
||||
time_wall_clock: Time::new::<second>(0.3),
|
||||
time_user: Time::new::<second>(0.3),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
]),
|
||||
@@ -327,24 +327,24 @@ fn test_markup_export_manual_s() {
|
||||
command: String::from("sleep 2"),
|
||||
measurements: Measurements::new(vec![
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(2.01),
|
||||
time_user: Time::from_seconds(2.01),
|
||||
time_wall_clock: Time::new::<second>(2.01),
|
||||
time_user: Time::new::<second>(2.01),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(2.02),
|
||||
time_user: Time::from_seconds(2.02),
|
||||
time_wall_clock: Time::new::<second>(2.02),
|
||||
time_user: Time::new::<second>(2.02),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(2.03),
|
||||
time_user: Time::from_seconds(2.03),
|
||||
time_wall_clock: Time::new::<second>(2.03),
|
||||
time_user: Time::new::<second>(2.03),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
]),
|
||||
@@ -354,24 +354,24 @@ fn test_markup_export_manual_s() {
|
||||
command: String::from("sleep 0.1"),
|
||||
measurements: Measurements::new(vec![
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(0.11),
|
||||
time_user: Time::from_seconds(0.11),
|
||||
time_wall_clock: Time::new::<second>(0.11),
|
||||
time_user: Time::new::<second>(0.11),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(0.12),
|
||||
time_user: Time::from_seconds(0.12),
|
||||
time_wall_clock: Time::new::<second>(0.12),
|
||||
time_user: Time::new::<second>(0.12),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
Measurement {
|
||||
time_wall_clock: Time::from_seconds(0.13),
|
||||
time_user: Time::from_seconds(0.13),
|
||||
time_wall_clock: Time::new::<second>(0.13),
|
||||
time_user: Time::new::<second>(0.13),
|
||||
time_system: Time::zero(),
|
||||
peak_memory_usage: Information::from_bytes(1024),
|
||||
peak_memory_usage: Information::new::<byte>(1024),
|
||||
exit_status: ExitStatus::default(),
|
||||
},
|
||||
]),
|
||||
|
||||
Reference in new issue
Block a user