mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-11-10 06:34:18 +00:00
Update benches
Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com>
This commit is contained in:
parent
1448d8cca9
commit
2993de26eb
2 changed files with 18 additions and 16 deletions
|
@ -13,18 +13,19 @@ test_read!(read_ape, "tests/assets/a.ape");
|
|||
test_read!(read_flac, "tests/assets/a.flac");
|
||||
test_read!(read_m4a, "tests/assets/a.m4a");
|
||||
test_read!(read_mp3, "tests/assets/a.mp3");
|
||||
test_read!(read_ogg, "tests/assets/a.ogg");
|
||||
//test_read!(read_ogg, "tests/assets/a.ogg");
|
||||
test_read!(read_opus, "tests/assets/a.opus");
|
||||
test_read!(read_wav, "tests/assets/a-id3.wav");
|
||||
|
||||
fn bench_ext(c: &mut Criterion) {
|
||||
c.bench_function("APE - Extension", |b| b.iter(read_ape));
|
||||
c.bench_function("FLAC - Extension", |b| b.iter(read_flac));
|
||||
c.bench_function("MP4 - Extension", |b| b.iter(read_m4a));
|
||||
c.bench_function("MP3 - Extension", |b| b.iter(read_mp3));
|
||||
c.bench_function("OGG - Extension", |b| b.iter(read_ogg));
|
||||
c.bench_function("OPUS - Extension", |b| b.iter(read_opus));
|
||||
c.bench_function("WAV - Extension", |b| b.iter(read_wav));
|
||||
let mut g = c.benchmark_group("From extension");
|
||||
g.bench_function("APE", |b| b.iter(read_ape));
|
||||
g.bench_function("FLAC", |b| b.iter(read_flac));
|
||||
g.bench_function("MP4", |b| b.iter(read_m4a));
|
||||
g.bench_function("MP3", |b| b.iter(read_mp3));
|
||||
//g.bench_function("OGG", |b| b.iter(read_ogg));
|
||||
g.bench_function("OPUS", |b| b.iter(read_opus));
|
||||
g.bench_function("WAV", |b| b.iter(read_wav));
|
||||
}
|
||||
|
||||
criterion_group!(benches, bench_ext);
|
||||
|
|
|
@ -13,18 +13,19 @@ test_read!(read_ape, "tests/assets/a.ape");
|
|||
test_read!(read_flac, "tests/assets/a.flac");
|
||||
test_read!(read_m4a, "tests/assets/a.m4a");
|
||||
test_read!(read_mp3, "tests/assets/a.mp3");
|
||||
test_read!(read_ogg, "tests/assets/a.ogg");
|
||||
//test_read!(read_ogg, "tests/assets/a.ogg");
|
||||
test_read!(read_opus, "tests/assets/a.opus");
|
||||
test_read!(read_wav, "tests/assets/a.wav");
|
||||
|
||||
fn bench_sig(c: &mut Criterion) {
|
||||
c.bench_function("APE - Signature", |b| b.iter(read_ape));
|
||||
c.bench_function("FLAC - Signature", |b| b.iter(read_flac));
|
||||
c.bench_function("MP4 - Signature", |b| b.iter(read_m4a));
|
||||
c.bench_function("MP3 - Signature", |b| b.iter(read_mp3));
|
||||
c.bench_function("OGG - Signature", |b| b.iter(read_ogg));
|
||||
c.bench_function("OPUS - Signature", |b| b.iter(read_opus));
|
||||
c.bench_function("WAV - Signature", |b| b.iter(read_wav));
|
||||
let mut g = c.benchmark_group("From signature");
|
||||
g.bench_function("APE", |b| b.iter(read_ape));
|
||||
g.bench_function("FLAC", |b| b.iter(read_flac));
|
||||
g.bench_function("MP4", |b| b.iter(read_m4a));
|
||||
g.bench_function("MP3", |b| b.iter(read_mp3));
|
||||
//g.bench_function("OGG", |b| b.iter(read_ogg));
|
||||
g.bench_function("OPUS", |b| b.iter(read_opus));
|
||||
g.bench_function("WAV", |b| b.iter(read_wav));
|
||||
}
|
||||
|
||||
criterion_group!(benches, bench_sig);
|
||||
|
|
Loading…
Reference in a new issue