Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
criterion 0.1.0 - Docs.rs
[go: Go Back, main page]

criterion 0.1.0

Statistics-driven micro-benchmarking library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern crate criterion;
extern crate walkdir;

use criterion::Criterion;

use walkdir::WalkDir;

#[test]
fn no_plots() {
    Criterion::default().without_plots().bench_function("dummy", |b| b.iter(|| {}));

    let has_svg = !WalkDir::new(".criterion/dummy").into_iter().any(|entry| {
        entry.unwrap().path().extension().and_then(|ext| ext.to_str()) == Some("svg")
    });
    assert!(has_svg)
}