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 name: Continuous Benchmarking with Bencher
on: on:
push: push:
paths: paths-ignore:
- 'src/**' - 'LICENSE-*'
- 'benches/**' - '**/*.md'
- 'ogg_pager/**' - '.gitignore'
- './examples'
- './fuzz'
- 'CHANGELOG.md'
branches: branches:
- main - main
workflow_dispatch: workflow_dispatch:

View file

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