mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2025-01-06 01:08:46 +00:00
Remove old benchmarks
This commit is contained in:
parent
9150c6c547
commit
2a5dbf446f
1 changed files with 1 additions and 28 deletions
|
@ -4,33 +4,6 @@ use criterion::{criterion_group, criterion_main, Criterion};
|
||||||
|
|
||||||
use std::io::Cursor;
|
use std::io::Cursor;
|
||||||
|
|
||||||
macro_rules! test_read_path {
|
|
||||||
($c:ident, [$(($NAME:literal, $path:expr)),+]) => {
|
|
||||||
let mut g = $c.benchmark_group("File reading (Inferred from Path)");
|
|
||||||
|
|
||||||
$(
|
|
||||||
g.bench_function($NAME, |b| b.iter(|| Probe::open($path).unwrap().read(true).unwrap()));
|
|
||||||
)+
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
fn path_infer_read(c: &mut Criterion) {
|
|
||||||
test_read_path!(
|
|
||||||
c,
|
|
||||||
[
|
|
||||||
("AIFF", "tests/files/assets/minimal/full_test.aiff"),
|
|
||||||
("APE", "tests/files/assets/minimal/full_test.ape"),
|
|
||||||
("FLAC", "tests/files/assets/minimal/full_test.flac"),
|
|
||||||
("MP4", "tests/files/assets/minimal/m4a_codec_aac.m4a"),
|
|
||||||
("MP3", "tests/files/assets/minimal/full_test.mp3"),
|
|
||||||
("OPUS", "tests/files/assets/minimal/full_test.opus"),
|
|
||||||
("RIFF", "tests/files/assets/minimal/wav_format_pcm.wav"),
|
|
||||||
("SPEEX", "tests/files/assets/minimal/full_test.spx"),
|
|
||||||
("VORBIS", "tests/files/assets/minimal/full_test.ogg")
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
macro_rules! test_read_file {
|
macro_rules! test_read_file {
|
||||||
($c:ident, [$(($NAME:ident, $path:expr)),+]) => {
|
($c:ident, [$(($NAME:ident, $path:expr)),+]) => {
|
||||||
let mut g = $c.benchmark_group("File reading (Inferred from Content)");
|
let mut g = $c.benchmark_group("File reading (Inferred from Content)");
|
||||||
|
@ -69,5 +42,5 @@ fn content_infer_read(c: &mut Criterion) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
criterion_group!(benches, path_infer_read, content_infer_read);
|
criterion_group!(benches, content_infer_read);
|
||||||
criterion_main!(benches);
|
criterion_main!(benches);
|
||||||
|
|
Loading…
Reference in a new issue