Lines Matching full:dir
30 fn short_benchmark(dir: &TempDir) -> Criterion { in short_benchmark()
32 .output_directory(dir.path()) in short_benchmark()
60 fn verify_file(dir: &PathBuf, path: &str) -> PathBuf { in verify_file()
61 let full_path = dir.join(path); in verify_file()
72 fn verify_json(dir: &PathBuf, path: &str) { in verify_json()
73 let full_path = verify_file(dir, path); in verify_json()
78 fn verify_svg(dir: &PathBuf, path: &str) { in verify_svg()
79 verify_file(dir, path); in verify_svg()
82 fn verify_html(dir: &PathBuf, path: &str) { in verify_html()
83 verify_file(dir, path); in verify_html()
86 fn verify_stats(dir: &PathBuf, baseline: &str) { in verify_stats()
87 verify_json(&dir, &format!("{}/estimates.json", baseline)); in verify_stats()
88 verify_json(&dir, &format!("{}/sample.json", baseline)); in verify_stats()
89 verify_json(&dir, &format!("{}/tukey.json", baseline)); in verify_stats()
90 verify_json(&dir, &format!("{}/benchmark.json", baseline)); in verify_stats()
91 verify_file(&dir, &format!("{}/raw.csv", baseline)); in verify_stats()
94 fn verify_not_exists(dir: &PathBuf, path: &str) { in verify_not_exists()
95 assert!(!dir.join(path).exists()); in verify_not_exists()
98 fn latest_modified(dir: &PathBuf) -> SystemTime { in latest_modified()
100 for entry in WalkDir::new(dir) { in latest_modified()
114 let dir = temp_dir(); in test_creates_directory() localVariable
115 short_benchmark(&dir).bench_function("test_creates_directory", |b| b.iter(|| 10)); in test_creates_directory()
116 assert!(dir.path().join("test_creates_directory").is_dir()); in test_creates_directory()
121 let dir = temp_dir(); in test_without_plots() localVariable
122 short_benchmark(&dir) in test_without_plots()
126 for entry in WalkDir::new(dir.path().join("test_without_plots")) { in test_without_plots()
144 let dir = temp_dir(); in test_save_baseline() localVariable
145 println!("tmp directory is {:?}", dir.path()); in test_save_baseline()
146 short_benchmark(&dir) in test_save_baseline()
150 let dir = dir.path().join("test_save_baseline"); in test_save_baseline() localVariable
151 verify_stats(&dir, "some-baseline"); in test_save_baseline()
153 verify_not_exists(&dir, "base"); in test_save_baseline()
159 let dir = temp_dir(); in test_retain_baseline() localVariable
160 short_benchmark(&dir) in test_retain_baseline()
164 let pre_modified = latest_modified(&dir.path().join("test_retain_baseline/some-baseline")); in test_retain_baseline()
166 short_benchmark(&dir) in test_retain_baseline()
170 let post_modified = latest_modified(&dir.path().join("test_retain_baseline/some-baseline")); in test_retain_baseline()
179 let dir = temp_dir(); in test_compare_baseline() localVariable
180 short_benchmark(&dir) in test_compare_baseline()
187 let dir = temp_dir(); in test_sample_size() localVariable
191 short_benchmark(&dir) in test_sample_size()
205 let dir = temp_dir(); in test_warmup_time() localVariable
209 short_benchmark(&dir) in test_warmup_time()
218 short_benchmark(&dir) in test_warmup_time()
230 let dir = temp_dir(); in test_measurement_time() localVariable
234 short_benchmark(&dir) in test_measurement_time()
240 short_benchmark(&dir) in test_measurement_time()
249 let dir = temp_dir(); in test_bench_function() localVariable
250 short_benchmark(&dir).bench_function("test_bench_function", move |b| b.iter(|| 10)); in test_bench_function()
255 let dir = temp_dir(); in test_bench_functions() localVariable
261 short_benchmark(&dir).bench_functions("test_bench_functions", functions, 20); in test_bench_functions()
266 let dir = temp_dir(); in test_bench_function_over_inputs() localVariable
267 short_benchmark(&dir).bench_function_over_inputs( in test_bench_function_over_inputs()
276 let dir = temp_dir(); in test_filtering() localVariable
280 short_benchmark(&dir) in test_filtering()
285 assert!(!dir.path().join("test_filtering").is_dir()); in test_filtering()
290 let dir = temp_dir(); in test_timing_loops() localVariable
291 short_benchmark(&dir).bench( in test_timing_loops()
338 let dir = temp_dir(); in test_throughput() localVariable
339 short_benchmark(&dir).bench( in test_throughput()
343 short_benchmark(&dir).bench( in test_throughput()
371 let dir = if x == 2 { in test_output_files() localVariable
378 verify_stats(&dir, "new"); in test_output_files()
379 verify_stats(&dir, "base"); in test_output_files()
380 verify_json(&dir, "change/estimates.json"); in test_output_files()
383 verify_svg(&dir, "report/MAD.svg"); in test_output_files()
384 verify_svg(&dir, "report/mean.svg"); in test_output_files()
385 verify_svg(&dir, "report/median.svg"); in test_output_files()
386 verify_svg(&dir, "report/pdf.svg"); in test_output_files()
387 verify_svg(&dir, "report/regression.svg"); in test_output_files()
388 verify_svg(&dir, "report/SD.svg"); in test_output_files()
389 verify_svg(&dir, "report/slope.svg"); in test_output_files()
390 verify_svg(&dir, "report/typical.svg"); in test_output_files()
391 verify_svg(&dir, "report/both/pdf.svg"); in test_output_files()
392 verify_svg(&dir, "report/both/regression.svg"); in test_output_files()
393 verify_svg(&dir, "report/change/mean.svg"); in test_output_files()
394 verify_svg(&dir, "report/change/median.svg"); in test_output_files()
395 verify_svg(&dir, "report/change/t-test.svg"); in test_output_files()
397 verify_svg(&dir, "report/pdf_small.svg"); in test_output_files()
398 verify_svg(&dir, "report/regression_small.svg"); in test_output_files()
399 verify_svg(&dir, "report/relative_pdf_small.svg"); in test_output_files()
400 verify_svg(&dir, "report/relative_regression_small.svg"); in test_output_files()
401 verify_html(&dir, "report/index.html"); in test_output_files()
407 let dir = tempdir.path().join("test_output"); in test_output_files() localVariable
409 verify_svg(&dir, "report/violin.svg"); in test_output_files()
410 verify_html(&dir, "report/index.html"); in test_output_files()
416 let dir = tempdir.path().to_owned(); in test_output_files() localVariable
418 verify_html(&dir, "report/index.html"); in test_output_files()
433 let dir = tempdir.path().join("test_output/output_flat"); in test_output_files_flat_sampling() localVariable
435 verify_stats(&dir, "new"); in test_output_files_flat_sampling()
436 verify_stats(&dir, "base"); in test_output_files_flat_sampling()
437 verify_json(&dir, "change/estimates.json"); in test_output_files_flat_sampling()
440 verify_svg(&dir, "report/MAD.svg"); in test_output_files_flat_sampling()
441 verify_svg(&dir, "report/mean.svg"); in test_output_files_flat_sampling()
442 verify_svg(&dir, "report/median.svg"); in test_output_files_flat_sampling()
443 verify_svg(&dir, "report/pdf.svg"); in test_output_files_flat_sampling()
444 verify_svg(&dir, "report/iteration_times.svg"); in test_output_files_flat_sampling()
445 verify_svg(&dir, "report/SD.svg"); in test_output_files_flat_sampling()
446 verify_svg(&dir, "report/typical.svg"); in test_output_files_flat_sampling()
447 verify_svg(&dir, "report/both/pdf.svg"); in test_output_files_flat_sampling()
448 verify_svg(&dir, "report/both/iteration_times.svg"); in test_output_files_flat_sampling()
449 verify_svg(&dir, "report/change/mean.svg"); in test_output_files_flat_sampling()
450 verify_svg(&dir, "report/change/median.svg"); in test_output_files_flat_sampling()
451 verify_svg(&dir, "report/change/t-test.svg"); in test_output_files_flat_sampling()
453 verify_svg(&dir, "report/pdf_small.svg"); in test_output_files_flat_sampling()
454 verify_svg(&dir, "report/iteration_times_small.svg"); in test_output_files_flat_sampling()
455 verify_svg(&dir, "report/relative_pdf_small.svg"); in test_output_files_flat_sampling()
456 verify_svg(&dir, "report/relative_iteration_times_small.svg"); in test_output_files_flat_sampling()
457 verify_html(&dir, "report/index.html"); in test_output_files_flat_sampling()
464 let dir = temp_dir(); in test_bench_with_no_iteration_panics() localVariable
465 short_benchmark(&dir).bench("test_no_iter", Benchmark::new("no_iter", |_b| {})); in test_bench_with_no_iteration_panics()
470 let dir = temp_dir(); in test_benchmark_group_with_input() localVariable
471 let mut c = short_benchmark(&dir); in test_benchmark_group_with_input()
482 let dir = temp_dir(); in test_benchmark_group_without_input() localVariable
483 let mut c = short_benchmark(&dir); in test_benchmark_group_without_input()
492 let dir = temp_dir(); in test_criterion_doesnt_panic_if_measured_time_is_zero() localVariable
493 let mut c = short_benchmark(&dir); in test_criterion_doesnt_panic_if_measured_time_is_zero()
587 let dir = temp_dir(); in test_profiler_called() localVariable
588 let mut criterion = short_benchmark(&dir) in test_profiler_called()