benches: Move assets outside of benches

Also specify the paths of the benchmarks, since publishing breaks when it cannot find them.
This commit is contained in:
Serial 2023-11-15 12:02:09 -05:00
parent d7199f1b71
commit 10e2fe35b5
No known key found for this signature in database
GPG key ID: DA95198DC17C4568
16 changed files with 37 additions and 17 deletions

View file

@ -9,7 +9,7 @@ repository = "https://github.com/Serial-ATA/lofty-rs"
keywords = ["tags", "audio", "metadata", "id3", "vorbis"] keywords = ["tags", "audio", "metadata", "id3", "vorbis"]
categories = ["multimedia", "multimedia::audio", "parser-implementations"] categories = ["multimedia", "multimedia::audio", "parser-implementations"]
readme = "README.md" readme = "README.md"
include = ["src", "Cargo.toml", "LICENSE-APACHE", "LICENSE-MIT", "benches", "SUPPORTED_FORMATS.md"] include = ["src", "Cargo.toml", "LICENSE-APACHE", "LICENSE-MIT", "SUPPORTED_FORMATS.md"]
[dependencies] [dependencies]
# Vorbis comments pictures # Vorbis comments pictures
@ -47,10 +47,12 @@ bench = false
[[bench]] [[bench]]
name = "read_file" name = "read_file"
path = "benches/read_file.rs"
harness = false harness = false
[[bench]] [[bench]]
name = "create_tag" name = "create_tag"
path = "benches/create_tag.rs"
harness = false harness = false
[[example]] [[example]]

View file

@ -49,7 +49,7 @@ fn bench_write(c: &mut Criterion) {
PictureType::CoverFront, PictureType::CoverFront,
MimeType::Jpeg, MimeType::Jpeg,
None, None,
include_bytes!("assets/cover.jpg").to_vec(), include_bytes!("../benches_assets/cover.jpg").to_vec(),
); );
tag.insert( tag.insert(
@ -75,7 +75,7 @@ fn bench_write(c: &mut Criterion) {
PictureType::CoverFront, PictureType::CoverFront,
MimeType::Jpeg, MimeType::Jpeg,
None, None,
include_bytes!("assets/cover.jpg").to_vec(), include_bytes!("../benches_assets/cover.jpg").to_vec(),
); );
tag.insert_picture(picture); tag.insert_picture(picture);
@ -99,7 +99,7 @@ fn bench_write(c: &mut Criterion) {
PictureType::CoverFront, PictureType::CoverFront,
MimeType::Jpeg, MimeType::Jpeg,
None, None,
include_bytes!("assets/cover.jpg").to_vec(), include_bytes!("../benches_assets/cover.jpg").to_vec(),
); );
tag.insert_picture(picture); tag.insert_picture(picture);
@ -118,7 +118,7 @@ fn bench_write(c: &mut Criterion) {
PictureType::CoverFront, PictureType::CoverFront,
MimeType::Jpeg, MimeType::Jpeg,
None, None,
include_bytes!("assets/cover.jpg").to_vec(), include_bytes!("../benches_assets/cover.jpg").to_vec(),
); );
let _ = tag.insert_picture(picture, None).unwrap(); let _ = tag.insert_picture(picture, None).unwrap();

View file

@ -30,18 +30,36 @@ fn content_infer_read(c: &mut Criterion) {
test_read_file!( test_read_file!(
c, c,
[ [
(AAC, "assets/01 TempleOS Hymn Risen (Remix).aac"), (AAC, "../benches_assets/01 TempleOS Hymn Risen (Remix).aac"),
(AIFF, "assets/01 TempleOS Hymn Risen (Remix).aiff"), (
(APE, "assets/01 TempleOS Hymn Risen (Remix).ape"), AIFF,
(FLAC, "assets/01 TempleOS Hymn Risen (Remix).flac"), "../benches_assets/01 TempleOS Hymn Risen (Remix).aiff"
(MP4, "assets/01 TempleOS Hymn Risen (Remix).m4a"), ),
(MP3, "assets/01 TempleOS Hymn Risen (Remix).mp3"), (APE, "../benches_assets/01 TempleOS Hymn Risen (Remix).ape"),
(MPC, "assets/01 TempleOS Hymn Risen (Remix).mpc"), (
(OPUS, "assets/01 TempleOS Hymn Risen (Remix).opus"), FLAC,
(RIFF, "assets/01 TempleOS Hymn Risen (Remix).wav"), "../benches_assets/01 TempleOS Hymn Risen (Remix).flac"
(SPEEX, "assets/01 TempleOS Hymn Risen (Remix).spx"), ),
(VORBIS, "assets/01 TempleOS Hymn Risen (Remix).ogg"), (MP4, "../benches_assets/01 TempleOS Hymn Risen (Remix).m4a"),
(WAVPACK, "assets/01 TempleOS Hymn Risen (Remix).wv"), (MP3, "../benches_assets/01 TempleOS Hymn Risen (Remix).mp3"),
(MPC, "../benches_assets/01 TempleOS Hymn Risen (Remix).mpc"),
(
OPUS,
"../benches_assets/01 TempleOS Hymn Risen (Remix).opus"
),
(RIFF, "../benches_assets/01 TempleOS Hymn Risen (Remix).wav"),
(
SPEEX,
"../benches_assets/01 TempleOS Hymn Risen (Remix).spx"
),
(
VORBIS,
"../benches_assets/01 TempleOS Hymn Risen (Remix).ogg"
),
(
WAVPACK,
"../benches_assets/01 TempleOS Hymn Risen (Remix).wv"
),
] ]
); );
} }

View file

Before

Width:  |  Height:  |  Size: 203 KiB

After

Width:  |  Height:  |  Size: 203 KiB