tests.rs
This file
Path
src/export/tests.rs
425 lines · 16.0 KiB · Rust
Last changed by
Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
History of this fileTake it
Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 1–2why, one step back1use super::Exporter;2use crate::benchmark::benchmark_result::BenchmarkResult;Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
line 3why, one step back3use crate::benchmark::measurement::{Measurement, Measurements};Move more tests to instaDavid Peterbefore adoptionda399ab
lines 4–5why, one step back4use crate::export::asciidoc::AsciidocExporter;5use crate::export::orgmode::OrgmodeExporter;Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
line 6why, one step back6use crate::quantity::{byte, second, Information, Time, TimeUnit, Zero};Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 7–8why, one step back7use crate::{export::markdown::MarkdownExporter, options::SortOrder};8use std::collections::BTreeMap;Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
line 9why, one step back9use std::process::ExitStatus;Use insta for exporter testsDavid Peterbefore adoption7a9d04d
line 10why, one step back10Move more tests to instaDavid Peterbefore adoptionda399ab
line 11why, one step back11fn get_output<E: Exporter + Default>(Use insta for exporter testsDavid Peterbefore adoption7a9d04d
line 12why, one step back12 results: &[BenchmarkResult],Merge pull request #962 from sharkdp/codex/quantity-module-layoutDavid Peterbefore adoptionecf8a24
line 13why, one step back13 unit: Option<TimeUnit>,Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 14–15why, one step back14 sort_order: SortOrder,15) -> String {Move more tests to instaDavid Peterbefore adoptionda399ab
line 16why, one step back16 let exporter = E::default();Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 17–19why, one step back17 String::from_utf8(exporter.serialize(results, unit, sort_order).unwrap()).unwrap()18}19Move more tests to instaDavid Peterbefore adoptionda399ab
line 20why, one step back20/// Ensure the makrup output includes the table header and the multipleUse insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 21–24why, one step back21/// benchmark results as a table. The list of actual times is not included22/// in the output.23///24/// This also demonstrates that the first entry's units (ms) are used to setMove more tests to instaDavid Peterbefore adoptionda399ab
line 25why, one step back25/// the units for all entries when the time unit is not specified.Use insta for exporter testsDavid Peterbefore adoption7a9d04d
line 26why, one step back26#[test]Move more tests to instaDavid Peterbefore adoptionda399ab
line 27why, one step back27fn test_markup_export_auto_ms() {Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 28–31why, one step back28 let results = [29 BenchmarkResult {30 command: String::from("sleep 0.1"),31 command_with_unused_parameters: String::from("sleep 0.1"),Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 32–54why, one step back32 measurements: Measurements::new(vec![33 Measurement {34 time_wall_clock: Time::new::<second>(0.09),35 time_user: Time::new::<second>(0.09),36 time_system: Time::zero(),37 peak_memory_usage: Information::new::<byte>(1024.),38 exit_status: ExitStatus::default(),39 },40 Measurement {41 time_wall_clock: Time::new::<second>(0.10),42 time_user: Time::new::<second>(0.10),43 time_system: Time::zero(),44 peak_memory_usage: Information::new::<byte>(1024.),45 exit_status: ExitStatus::default(),46 },47 Measurement {48 time_wall_clock: Time::new::<second>(0.14),49 time_user: Time::new::<second>(0.14),50 time_system: Time::zero(),51 peak_memory_usage: Information::new::<byte>(1024.),52 exit_status: ExitStatus::default(),53 },54 ]),Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 55–59why, one step back55 parameters: BTreeMap::new(),56 },57 BenchmarkResult {58 command: String::from("sleep 2"),59 command_with_unused_parameters: String::from("sleep 2"),Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 60–82why, one step back60 measurements: Measurements::new(vec![61 Measurement {62 time_wall_clock: Time::new::<second>(2.0),63 time_user: Time::new::<second>(2.0),64 time_system: Time::zero(),65 peak_memory_usage: Information::new::<byte>(1024.),66 exit_status: ExitStatus::default(),67 },68 Measurement {69 time_wall_clock: Time::new::<second>(3.0),70 time_user: Time::new::<second>(3.0),71 time_system: Time::zero(),72 peak_memory_usage: Information::new::<byte>(1024.),73 exit_status: ExitStatus::default(),74 },75 Measurement {76 time_wall_clock: Time::new::<second>(4.0),77 time_user: Time::new::<second>(4.0),78 time_system: Time::zero(),79 peak_memory_usage: Information::new::<byte>(1024.),80 exit_status: ExitStatus::default(),81 },82 ]),Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 83–86why, one step back83 parameters: BTreeMap::new(),84 },85 ];86Move more tests to instaDavid Peterbefore adoptionda399ab
line 87why, one step back87 insta::assert_snapshot!(get_output::<MarkdownExporter>(&results, None, SortOrder::Command), @r#"Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 88–89why, one step back88 | Command | Mean [ms] | Min [ms] | Max [ms] | Relative |89 |:---|---:|---:|---:|---:|Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 90–91why, one step back90 | `sleep 0.1` | 110.0 ± 26.5 | 90.0 | 140.0 | 1.00 |91 | `sleep 2` | 3000.0 ± 1000.0 | 2000.0 | 4000.0 | 27.27 ± 11.21 |Use insta for exporter testsDavid Peterbefore adoption7a9d04d
line 92why, one step back92 "#);Move more tests to instaDavid Peterbefore adoptionda399ab
lines 93–103why, one step back9394 insta::assert_snapshot!(get_output::<AsciidocExporter>(&results, None, SortOrder::Command), @r#"95 [cols="<,>,>,>,>"]96 |===97 | Command 98 | Mean [ms] 99 | Min [ms] 100 | Max [ms] 101 | Relative 102103 | `sleep 0.1` Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 104–106why, one step back104 | 110.0 ± 26.5 105 | 90.0 106 | 140.0 Move more tests to instaDavid Peterbefore adoptionda399ab
lines 107–109why, one step back107 | 1.00 108109 | `sleep 2` Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 110–113why, one step back110 | 3000.0 ± 1000.0 111 | 2000.0 112 | 4000.0 113 | 27.27 ± 11.21 Move more tests to instaDavid Peterbefore adoptionda399ab
lines 114–119why, one step back114 |===115 "#);116117 insta::assert_snapshot!(get_output::<OrgmodeExporter>(&results, None, SortOrder::Command), @r#"118 | Command | Mean [ms] | Min [ms] | Max [ms] | Relative |119 |--+--+--+--+--|Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 120–121why, one step back120 | =sleep 0.1= | 110.0 ± 26.5 | 90.0 | 140.0 | 1.00 |121 | =sleep 2= | 3000.0 ± 1000.0 | 2000.0 | 4000.0 | 27.27 ± 11.21 |Move more tests to instaDavid Peterbefore adoptionda399ab
line 122why, one step back122 "#);Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 123–127why, one step back123}124125/// This (again) demonstrates that the first entry's units (s) are used to set126/// the units for all entries when the time unit is not given.127#[test]Move more tests to instaDavid Peterbefore adoptionda399ab
line 128why, one step back128fn test_markup_export_auto_s() {Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 129–132why, one step back129 let results = [130 BenchmarkResult {131 command: String::from("sleep 2"),132 command_with_unused_parameters: String::from("sleep 2"),Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 133–155why, one step back133 measurements: Measurements::new(vec![134 Measurement {135 time_wall_clock: Time::new::<second>(2.1),136 time_user: Time::new::<second>(2.1),137 time_system: Time::zero(),138 peak_memory_usage: Information::new::<byte>(1024.),139 exit_status: ExitStatus::default(),140 },141 Measurement {142 time_wall_clock: Time::new::<second>(2.2),143 time_user: Time::new::<second>(2.2),144 time_system: Time::zero(),145 peak_memory_usage: Information::new::<byte>(1024.),146 exit_status: ExitStatus::default(),147 },148 Measurement {149 time_wall_clock: Time::new::<second>(2.3),150 time_user: Time::new::<second>(2.3),151 time_system: Time::zero(),152 peak_memory_usage: Information::new::<byte>(1024.),153 exit_status: ExitStatus::default(),154 },155 ]),Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 156–160why, one step back156 parameters: BTreeMap::new(),157 },158 BenchmarkResult {159 command: String::from("sleep 0.1"),160 command_with_unused_parameters: String::from("sleep 0.1"),Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 161–183why, one step back161 measurements: Measurements::new(vec![162 Measurement {163 time_wall_clock: Time::new::<second>(0.1),164 time_user: Time::new::<second>(0.1),165 time_system: Time::zero(),166 peak_memory_usage: Information::new::<byte>(1024.),167 exit_status: ExitStatus::default(),168 },169 Measurement {170 time_wall_clock: Time::new::<second>(0.2),171 time_user: Time::new::<second>(0.2),172 time_system: Time::zero(),173 peak_memory_usage: Information::new::<byte>(1024.),174 exit_status: ExitStatus::default(),175 },176 Measurement {177 time_wall_clock: Time::new::<second>(0.3),178 time_user: Time::new::<second>(0.3),179 time_system: Time::zero(),180 peak_memory_usage: Information::new::<byte>(1024.),181 exit_status: ExitStatus::default(),182 },183 ]),Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 184–187why, one step back184 parameters: BTreeMap::new(),185 },186 ];187Move more tests to instaDavid Peterbefore adoptionda399ab
line 188why, one step back188 insta::assert_snapshot!(get_output::<MarkdownExporter>(&results, None, SortOrder::Command), @r#"Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 189–190why, one step back189 | Command | Mean [s] | Min [s] | Max [s] | Relative |190 |:---|---:|---:|---:|---:|Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 191–192why, one step back191 | `sleep 2` | 2.200 ± 0.100 | 2.100 | 2.300 | 11.00 ± 5.52 |192 | `sleep 0.1` | 0.200 ± 0.100 | 0.100 | 0.300 | 1.00 |Use insta for exporter testsDavid Peterbefore adoption7a9d04d
line 193why, one step back193 "#);Move more tests to instaDavid Peterbefore adoptionda399ab
lines 194–204why, one step back194195 insta::assert_snapshot!(get_output::<AsciidocExporter>(&results, None, SortOrder::Command), @r#"196 [cols="<,>,>,>,>"]197 |===198 | Command 199 | Mean [s] 200 | Min [s] 201 | Max [s] 202 | Relative 203204 | `sleep 2` Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 205–208why, one step back205 | 2.200 ± 0.100 206 | 2.100 207 | 2.300 208 | 11.00 ± 5.52 Move more tests to instaDavid Peterbefore adoptionda399ab
lines 209–210why, one step back209210 | `sleep 0.1` Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 211–213why, one step back211 | 0.200 ± 0.100 212 | 0.100 213 | 0.300 Move more tests to instaDavid Peterbefore adoptionda399ab
lines 214–220why, one step back214 | 1.00 215 |===216 "#);217218 insta::assert_snapshot!(get_output::<OrgmodeExporter>(&results, None, SortOrder::Command), @r#"219 | Command | Mean [s] | Min [s] | Max [s] | Relative |220 |--+--+--+--+--|Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 221–222why, one step back221 | =sleep 2= | 2.200 ± 0.100 | 2.100 | 2.300 | 11.00 ± 5.52 |222 | =sleep 0.1= | 0.200 ± 0.100 | 0.100 | 0.300 | 1.00 |Move more tests to instaDavid Peterbefore adoptionda399ab
line 223why, one step back223 "#);Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 224–225why, one step back224}225Move more tests to instaDavid Peterbefore adoptionda399ab
lines 226–227why, one step back226/// This (again) demonstrates that the given time unit (ms) is used to set227/// the units for all entries.Use insta for exporter testsDavid Peterbefore adoption7a9d04d
line 228why, one step back228#[test]Move more tests to instaDavid Peterbefore adoptionda399ab
lines 229–230why, one step back229fn test_markup_export_manual_ms() {230 let timing_results = [Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 231–233why, one step back231 BenchmarkResult {232 command: String::from("sleep 2"),233 command_with_unused_parameters: String::from("sleep 2"),Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 234–256why, one step back234 measurements: Measurements::new(vec![235 Measurement {236 time_wall_clock: Time::new::<second>(2.1),237 time_user: Time::new::<second>(2.1),238 time_system: Time::zero(),239 peak_memory_usage: Information::new::<byte>(1024.),240 exit_status: ExitStatus::default(),241 },242 Measurement {243 time_wall_clock: Time::new::<second>(2.2),244 time_user: Time::new::<second>(2.2),245 time_system: Time::zero(),246 peak_memory_usage: Information::new::<byte>(1024.),247 exit_status: ExitStatus::default(),248 },249 Measurement {250 time_wall_clock: Time::new::<second>(2.3),251 time_user: Time::new::<second>(2.3),252 time_system: Time::zero(),253 peak_memory_usage: Information::new::<byte>(1024.),254 exit_status: ExitStatus::default(),255 },256 ]),Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 257–261why, one step back257 parameters: BTreeMap::new(),258 },259 BenchmarkResult {260 command: String::from("sleep 0.1"),261 command_with_unused_parameters: String::from("sleep 0.1"),Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 262–284why, one step back262 measurements: Measurements::new(vec![263 Measurement {264 time_wall_clock: Time::new::<second>(0.1),265 time_user: Time::new::<second>(0.1),266 time_system: Time::zero(),267 peak_memory_usage: Information::new::<byte>(1024.),268 exit_status: ExitStatus::default(),269 },270 Measurement {271 time_wall_clock: Time::new::<second>(0.2),272 time_user: Time::new::<second>(0.2),273 time_system: Time::zero(),274 peak_memory_usage: Information::new::<byte>(1024.),275 exit_status: ExitStatus::default(),276 },277 Measurement {278 time_wall_clock: Time::new::<second>(0.3),279 time_user: Time::new::<second>(0.3),280 time_system: Time::zero(),281 peak_memory_usage: Information::new::<byte>(1024.),282 exit_status: ExitStatus::default(),283 },284 ]),Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 285–288why, one step back285 parameters: BTreeMap::new(),286 },287 ];288Merge pull request #962 from sharkdp/codex/quantity-module-layoutDavid Peterbefore adoptionecf8a24
line 289why, one step back289 insta::assert_snapshot!(get_output::<MarkdownExporter>(&timing_results, Some(TimeUnit::MilliSecond), SortOrder::Command), @r#"Move more tests to instaDavid Peterbefore adoptionda399ab
lines 290–291why, one step back290 | Command | Mean [ms] | Min [ms] | Max [ms] | Relative |291 |:---|---:|---:|---:|---:|Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 292–293why, one step back292 | `sleep 2` | 2200.0 ± 100.0 | 2100.0 | 2300.0 | 11.00 ± 5.52 |293 | `sleep 0.1` | 200.0 ± 100.0 | 100.0 | 300.0 | 1.00 |Move more tests to instaDavid Peterbefore adoptionda399ab
line 294why, one step back294 "#);Use insta for exporter testsDavid Peterbefore adoption7a9d04d
line 295why, one step back295Merge pull request #962 from sharkdp/codex/quantity-module-layoutDavid Peterbefore adoptionecf8a24
line 296why, one step back296 insta::assert_snapshot!(get_output::<AsciidocExporter>(&timing_results, Some(TimeUnit::MilliSecond), SortOrder::Command), @r#"Move more tests to instaDavid Peterbefore adoptionda399ab
lines 297–305why, one step back297 [cols="<,>,>,>,>"]298 |===299 | Command 300 | Mean [ms] 301 | Min [ms] 302 | Max [ms] 303 | Relative 304305 | `sleep 2` Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 306–309why, one step back306 | 2200.0 ± 100.0 307 | 2100.0 308 | 2300.0 309 | 11.00 ± 5.52 Move more tests to instaDavid Peterbefore adoptionda399ab
lines 310–311why, one step back310311 | `sleep 0.1` Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 312–314why, one step back312 | 200.0 ± 100.0 313 | 100.0 314 | 300.0 Move more tests to instaDavid Peterbefore adoptionda399ab
lines 315–318why, one step back315 | 1.00 316 |===317 "#);318Merge pull request #962 from sharkdp/codex/quantity-module-layoutDavid Peterbefore adoptionecf8a24
line 319why, one step back319 insta::assert_snapshot!(get_output::<OrgmodeExporter>(&timing_results, Some(TimeUnit::MilliSecond), SortOrder::Command), @r#"Move more tests to instaDavid Peterbefore adoptionda399ab
lines 320–321why, one step back320 | Command | Mean [ms] | Min [ms] | Max [ms] | Relative |321 |--+--+--+--+--|Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 322–323why, one step back322 | =sleep 2= | 2200.0 ± 100.0 | 2100.0 | 2300.0 | 11.00 ± 5.52 |323 | =sleep 0.1= | 200.0 ± 100.0 | 100.0 | 300.0 | 1.00 |Move more tests to instaDavid Peterbefore adoptionda399ab
line 324why, one step back324 "#);Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 325–326why, one step back325}326Move more tests to instaDavid Peterbefore adoptionda399ab
line 327why, one step back327/// The given time unit (s) is used to set the units for all entries.Use insta for exporter testsDavid Peterbefore adoption7a9d04d
line 328why, one step back328#[test]Move more tests to instaDavid Peterbefore adoptionda399ab
lines 329–330why, one step back329fn test_markup_export_manual_s() {330 let results = [Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 331–333why, one step back331 BenchmarkResult {332 command: String::from("sleep 2"),333 command_with_unused_parameters: String::from("sleep 2"),Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 334–356why, one step back334 measurements: Measurements::new(vec![335 Measurement {336 time_wall_clock: Time::new::<second>(2.01),337 time_user: Time::new::<second>(2.01),338 time_system: Time::zero(),339 peak_memory_usage: Information::new::<byte>(1024.),340 exit_status: ExitStatus::default(),341 },342 Measurement {343 time_wall_clock: Time::new::<second>(2.02),344 time_user: Time::new::<second>(2.02),345 time_system: Time::zero(),346 peak_memory_usage: Information::new::<byte>(1024.),347 exit_status: ExitStatus::default(),348 },349 Measurement {350 time_wall_clock: Time::new::<second>(2.03),351 time_user: Time::new::<second>(2.03),352 time_system: Time::zero(),353 peak_memory_usage: Information::new::<byte>(1024.),354 exit_status: ExitStatus::default(),355 },356 ]),Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 357–361why, one step back357 parameters: BTreeMap::new(),358 },359 BenchmarkResult {360 command: String::from("sleep 0.1"),361 command_with_unused_parameters: String::from("sleep 0.1"),Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 362–384why, one step back362 measurements: Measurements::new(vec![363 Measurement {364 time_wall_clock: Time::new::<second>(0.11),365 time_user: Time::new::<second>(0.11),366 time_system: Time::zero(),367 peak_memory_usage: Information::new::<byte>(1024.),368 exit_status: ExitStatus::default(),369 },370 Measurement {371 time_wall_clock: Time::new::<second>(0.12),372 time_user: Time::new::<second>(0.12),373 time_system: Time::zero(),374 peak_memory_usage: Information::new::<byte>(1024.),375 exit_status: ExitStatus::default(),376 },377 Measurement {378 time_wall_clock: Time::new::<second>(0.13),379 time_user: Time::new::<second>(0.13),380 time_system: Time::zero(),381 peak_memory_usage: Information::new::<byte>(1024.),382 exit_status: ExitStatus::default(),383 },384 ]),Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 385–388why, one step back385 parameters: BTreeMap::new(),386 },387 ];388Merge pull request #962 from sharkdp/codex/quantity-module-layoutDavid Peterbefore adoptionecf8a24
line 389why, one step back389 insta::assert_snapshot!(get_output::<MarkdownExporter>(&results, Some(TimeUnit::Second), SortOrder::Command), @r#"Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 390–394why, one step back390 | Command | Mean [s] | Min [s] | Max [s] | Relative |391 |:---|---:|---:|---:|---:|392 | `sleep 2` | 2.020 ± 0.010 | 2.010 | 2.030 | 16.83 ± 1.41 |393 | `sleep 0.1` | 0.120 ± 0.010 | 0.110 | 0.130 | 1.00 |394 "#);Move more tests to instaDavid Peterbefore adoptionda399ab
line 395why, one step back395Merge pull request #962 from sharkdp/codex/quantity-module-layoutDavid Peterbefore adoptionecf8a24
line 396why, one step back396 insta::assert_snapshot!(get_output::<MarkdownExporter>(&results, Some(TimeUnit::Second), SortOrder::MeanTime), @r#"Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 397–401why, one step back397 | Command | Mean [s] | Min [s] | Max [s] | Relative |398 |:---|---:|---:|---:|---:|399 | `sleep 0.1` | 0.120 ± 0.010 | 0.110 | 0.130 | 1.00 |400 | `sleep 2` | 2.020 ± 0.010 | 2.010 | 2.030 | 16.83 ± 1.41 |401 "#);Move more tests to instaDavid Peterbefore adoptionda399ab
line 402why, one step back402Merge pull request #962 from sharkdp/codex/quantity-module-layoutDavid Peterbefore adoptionecf8a24
line 403why, one step back403 insta::assert_snapshot!(get_output::<AsciidocExporter>(&results, Some(TimeUnit::Second), SortOrder::Command), @r#"Move more tests to instaDavid Peterbefore adoptionda399ab
lines 404–412why, one step back404 [cols="<,>,>,>,>"]405 |===406 | Command 407 | Mean [s] 408 | Min [s] 409 | Max [s] 410 | Relative 411412 | `sleep 2` Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 413–416why, one step back413 | 2.020 ± 0.010 414 | 2.010 415 | 2.030 416 | 16.83 ± 1.41 Move more tests to instaDavid Peterbefore adoptionda399ab
lines 417–418why, one step back417418 | `sleep 0.1` Merge pull request #969 from sharkdp/codex/result-measurementsDavid Peterbefore adoptione689520
lines 419–421why, one step back419 | 0.120 ± 0.010 420 | 0.110 421 | 0.130 Move more tests to instaDavid Peterbefore adoptionda399ab
lines 422–423why, one step back422 | 1.00 423 |===Use insta for exporter testsDavid Peterbefore adoption7a9d04d
lines 424–425why, one step back424 "#);425}