• Home
  • Raw
  • Download

Lines Matching refs:dir

29 fn short_benchmark(dir: &TempDir) -> Criterion {  in short_benchmark()
31 .output_directory(dir.path()) in short_benchmark()
58 fn verify_file(dir: &PathBuf, path: &str) -> PathBuf { in verify_file()
59 let full_path = dir.join(path); in verify_file()
70 fn verify_json(dir: &PathBuf, path: &str) { in verify_json()
71 let full_path = verify_file(dir, path); in verify_json()
77 fn verify_svg(dir: &PathBuf, path: &str) { in verify_svg()
78 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()
92 verify_file(&dir, &format!("{}/raw.csv", baseline)); in verify_stats()
95 fn verify_not_exists(dir: &PathBuf, path: &str) { in verify_not_exists()
96 assert!(!dir.join(path).exists()); in verify_not_exists()
99 fn latest_modified(dir: &PathBuf) -> SystemTime { in latest_modified()
101 for entry in WalkDir::new(dir) { in latest_modified()
115 let dir = temp_dir(); in test_creates_directory() localVariable
116 short_benchmark(&dir).bench_function("test_creates_directory", |b| b.iter(|| 10)); in test_creates_directory()
117 assert!(dir.path().join("test_creates_directory").is_dir()); in test_creates_directory()
122 let dir = temp_dir(); in test_without_plots() localVariable
123 short_benchmark(&dir) in test_without_plots()
127 for entry in WalkDir::new(dir.path().join("test_without_plots")) { in test_without_plots()
145 let dir = temp_dir(); in test_save_baseline() localVariable
146 println!("tmp directory is {:?}", dir.path()); in test_save_baseline()
147 short_benchmark(&dir) in test_save_baseline()
151 let dir = dir.path().join("test_save_baseline"); in test_save_baseline() localVariable
152 verify_stats(&dir, "some-baseline"); in test_save_baseline()
154 verify_not_exists(&dir, "base"); in test_save_baseline()
160 let dir = temp_dir(); in test_retain_baseline() localVariable
161 short_benchmark(&dir) in test_retain_baseline()
165 let pre_modified = latest_modified(&dir.path().join("test_retain_baseline/some-baseline")); in test_retain_baseline()
167 short_benchmark(&dir) in test_retain_baseline()
171 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_strict_panics_when_missing_baseline() localVariable
180 short_benchmark(&dir) in test_compare_baseline_strict_panics_when_missing_baseline()
187 let dir = temp_dir(); in test_compare_baseline_lenient_when_missing_baseline() localVariable
188 short_benchmark(&dir) in test_compare_baseline_lenient_when_missing_baseline()
195 let dir = temp_dir(); in test_sample_size() localVariable
199 short_benchmark(&dir) in test_sample_size()
213 let dir = temp_dir(); in test_warmup_time() localVariable
217 short_benchmark(&dir) in test_warmup_time()
226 short_benchmark(&dir) in test_warmup_time()
238 let dir = temp_dir(); in test_measurement_time() localVariable
242 short_benchmark(&dir) in test_measurement_time()
248 short_benchmark(&dir) in test_measurement_time()
257 let dir = temp_dir(); in test_bench_function() localVariable
258 short_benchmark(&dir).bench_function("test_bench_function", move |b| b.iter(|| 10)); in test_bench_function()
263 let dir = temp_dir(); in test_filtering() localVariable
267 short_benchmark(&dir) in test_filtering()
272 assert!(!dir.path().join("test_filtering").is_dir()); in test_filtering()
277 let dir = temp_dir(); in test_timing_loops() localVariable
278 let mut c = short_benchmark(&dir); in test_timing_loops()
338 let dir = if x == 2 { in test_output_files() localVariable
345 verify_stats(&dir, "new"); in test_output_files()
346 verify_stats(&dir, "base"); in test_output_files()
347 verify_json(&dir, "change/estimates.json"); in test_output_files()
351 verify_svg(&dir, "report/MAD.svg"); in test_output_files()
352 verify_svg(&dir, "report/mean.svg"); in test_output_files()
353 verify_svg(&dir, "report/median.svg"); in test_output_files()
354 verify_svg(&dir, "report/pdf.svg"); in test_output_files()
355 verify_svg(&dir, "report/regression.svg"); in test_output_files()
356 verify_svg(&dir, "report/SD.svg"); in test_output_files()
357 verify_svg(&dir, "report/slope.svg"); in test_output_files()
358 verify_svg(&dir, "report/typical.svg"); in test_output_files()
359 verify_svg(&dir, "report/both/pdf.svg"); in test_output_files()
360 verify_svg(&dir, "report/both/regression.svg"); in test_output_files()
361 verify_svg(&dir, "report/change/mean.svg"); in test_output_files()
362 verify_svg(&dir, "report/change/median.svg"); in test_output_files()
363 verify_svg(&dir, "report/change/t-test.svg"); in test_output_files()
365 verify_svg(&dir, "report/pdf_small.svg"); in test_output_files()
366 verify_svg(&dir, "report/regression_small.svg"); in test_output_files()
367 verify_svg(&dir, "report/relative_pdf_small.svg"); in test_output_files()
368 verify_svg(&dir, "report/relative_regression_small.svg"); in test_output_files()
369 verify_html(&dir, "report/index.html"); in test_output_files()
376 let dir = tempdir.path().join("test_output"); in test_output_files() localVariable
378 verify_svg(&dir, "report/violin.svg"); in test_output_files()
379 verify_html(&dir, "report/index.html"); in test_output_files()
387 let dir = tempdir.path().to_owned(); in test_output_files() localVariable
388 verify_html(&dir, "report/index.html"); in test_output_files()
404 let dir = tempdir.path().join("test_output/output_flat"); in test_output_files_flat_sampling() localVariable
406 verify_stats(&dir, "new"); in test_output_files_flat_sampling()
407 verify_stats(&dir, "base"); in test_output_files_flat_sampling()
408 verify_json(&dir, "change/estimates.json"); in test_output_files_flat_sampling()
412 verify_svg(&dir, "report/MAD.svg"); in test_output_files_flat_sampling()
413 verify_svg(&dir, "report/mean.svg"); in test_output_files_flat_sampling()
414 verify_svg(&dir, "report/median.svg"); in test_output_files_flat_sampling()
415 verify_svg(&dir, "report/pdf.svg"); in test_output_files_flat_sampling()
416 verify_svg(&dir, "report/iteration_times.svg"); in test_output_files_flat_sampling()
417 verify_svg(&dir, "report/SD.svg"); in test_output_files_flat_sampling()
418 verify_svg(&dir, "report/typical.svg"); in test_output_files_flat_sampling()
419 verify_svg(&dir, "report/both/pdf.svg"); in test_output_files_flat_sampling()
420 verify_svg(&dir, "report/both/iteration_times.svg"); in test_output_files_flat_sampling()
421 verify_svg(&dir, "report/change/mean.svg"); in test_output_files_flat_sampling()
422 verify_svg(&dir, "report/change/median.svg"); in test_output_files_flat_sampling()
423 verify_svg(&dir, "report/change/t-test.svg"); in test_output_files_flat_sampling()
425 verify_svg(&dir, "report/pdf_small.svg"); in test_output_files_flat_sampling()
426 verify_svg(&dir, "report/iteration_times_small.svg"); in test_output_files_flat_sampling()
427 verify_svg(&dir, "report/relative_pdf_small.svg"); in test_output_files_flat_sampling()
428 verify_svg(&dir, "report/relative_iteration_times_small.svg"); in test_output_files_flat_sampling()
429 verify_html(&dir, "report/index.html"); in test_output_files_flat_sampling()
436 let dir = temp_dir(); in test_bench_with_no_iteration_panics() localVariable
437 short_benchmark(&dir).bench_function("no_iter", |_b| {}); in test_bench_with_no_iteration_panics()
442 let dir = temp_dir(); in test_benchmark_group_with_input() localVariable
443 let mut c = short_benchmark(&dir); in test_benchmark_group_with_input()
454 let dir = temp_dir(); in test_benchmark_group_without_input() localVariable
455 let mut c = short_benchmark(&dir); in test_benchmark_group_without_input()
464 let dir = temp_dir(); in test_criterion_doesnt_panic_if_measured_time_is_zero() localVariable
465 let mut c = short_benchmark(&dir); in test_criterion_doesnt_panic_if_measured_time_is_zero()
559 let dir = temp_dir(); in test_profiler_called() localVariable
560 let mut criterion = short_benchmark(&dir) in test_profiler_called()