File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 2323 override : true
2424
2525 - name : Run benchmark
26+ env :
27+ RUSTFLAGS : " --cfg bench"
2628 run : cargo bench --all-features -- --output-format bencher | tee output.txt
2729
2830 - name : Store benchmark result
Original file line number Diff line number Diff line change @@ -41,13 +41,16 @@ aiff_text_chunks = []
4141riff_info_list = []
4242
4343[dev-dependencies ]
44- criterion = { version = " 0.4.0" , features = [" html_reports" ] }
4544# WAV properties validity tests
4645hound = { git = " https://github.com/ruuda/hound.git" , rev = " 02e66effb33683dd6acb92df792683ee46ad6a59" }
4746# tag_writer example
4847structopt = { version = " 0.3.26" , default-features = false }
4948tempfile = " 3.3.0"
5049
50+ # Pretty heavy dependency, we don't want this compiling for test/doc runs
51+ [target .'cfg(bench)' .dev-dependencies ]
52+ criterion = { version = " 0.4.0" , features = [" html_reports" ] }
53+
5154[lib ]
5255bench = false
5356
Original file line number Diff line number Diff line change @@ -35,6 +35,17 @@ cargo run --example custom_resolver
3535
3636Available [ here] ( https://docs.rs/lofty )
3737
38+ ## Benchmarking
39+
40+ There are benchmarks available [ here] ( ./benches ) .
41+
42+ These benchmarks make use of [ criterion] ( https://github.com/bheisler/criterion.rs ) , and
43+ due to its size it cannot be a normal dev-dependency. To run the benchmarks do:
44+
45+ ``` shell
46+ RUSTFLAGS=" --cfg bench" cargo bench
47+ ```
48+
3849## License
3950
4051Licensed under either of
You can’t perform that action at this time.
0 commit comments