Debian Codegraph @

benches/bench.rs

raw symbols SCIP
1 #![feature(test)]
2
3 extern crate testrust-analyzer cargo dissimilar 1.0.2 test/;
4
5 use dissimilarrust-analyzer cargo dissimilar 1.0.2 crate/::diffrust-analyzer cargo dissimilar 1.0.2 diff().;
6 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::{fsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std fs/, iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/};
7 use testrust-analyzer cargo test https://github.com/rust-lang/rust/library/test crate/::Bencherrust-analyzer cargo test https://github.com/rust-lang/rust/library/test bench/Bencher#;
8
9 #[benchrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/bench:]
10 fn benchrust-analyzer cargo dissimilar 1.0.2 bench().(b: &mut Bencherrust-analyzer cargo test https://github.com/rust-lang/rust/library/test bench/Bencher#) -> iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Resultrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Result#<()> {
11 let document1 = fsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std fs/::read_to_stringrust-analyzer cargo std https://github.com/rust-lang/rust/library/std fs/read_to_string().("benches/document1.txt")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
12 let document2 = fsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std fs/::read_to_stringrust-analyzer cargo std https://github.com/rust-lang/rust/library/std fs/read_to_string().("benches/document2.txt")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
13 b.iterrust-analyzer cargo test https://github.com/rust-lang/rust/library/test bench/impl#[Bencher]iter().(|| diffrust-analyzer cargo dissimilar 1.0.2 diff().(&document1, &document2));
14 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
15 }