benches: Update for recent changes

This commit is contained in:
Serial 2024-05-04 17:20:42 -04:00
parent 5b40a2f3a4
commit c2e47d9dcb
No known key found for this signature in database
GPG key ID: DA95198DC17C4568
2 changed files with 15 additions and 16 deletions

View file

@ -1,10 +1,13 @@
name: Continuous Benchmarking with Bencher
on:
push:
paths:
- 'src/**'
- 'benches/**'
- 'ogg_pager/**'
paths-ignore:
- 'LICENSE-*'
- '**/*.md'
- '.gitignore'
- './examples'
- './fuzz'
- 'CHANGELOG.md'
branches:
- main
workflow_dispatch:

View file

@ -3,7 +3,7 @@
use lofty::ape::ApeTag;
use lofty::config::WriteOptions;
use lofty::id3::v1::Id3v1Tag;
use lofty::id3::v2::Id3v2Tag;
use lofty::id3::v2::{FrameId, Id3v2Tag};
use lofty::iff::aiff::AiffTextChunks;
use lofty::iff::wav::RiffInfoList;
use lofty::mp4::Ilst;
@ -11,6 +11,8 @@ use lofty::ogg::VorbisComments;
use lofty::picture::{MimeType, Picture, PictureType};
use lofty::tag::{Accessor, TagExt};
use std::borrow::Cow;
use iai_callgrind::{library_benchmark, library_benchmark_group, main};
const ENCODER: &str = "Lavf57.56.101";
@ -76,17 +78,11 @@ bench_tag_write!([
);
tag.insert_picture(picture);
tag.insert(
Frame::new(
"TSSE",
TextInformationFrame {
encoding: TextEncoding::Latin1,
value: String::from(ENCODER),
},
FrameFlags::default(),
)
.unwrap(),
);
tag.insert(Frame::Text(TextInformationFrame::new(
FrameId::Valid(Cow::Borrowed("TSSE")),
TextEncoding::Latin1,
String::from(ENCODER),
)));
}),
(id3v1, Id3v1Tag, |tag| {}),
(ilst, Ilst, |tag| {