mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
fix nbt decode benchmark
This commit is contained in:
parent
1bbd8b99b3
commit
67c6e33344
1 changed files with 8 additions and 6 deletions
|
@ -29,12 +29,14 @@ fn bench_serialize(filename: &str, c: &mut Criterion) {
|
|||
group.throughput(Throughput::Bytes(decoded_src.len() as u64));
|
||||
|
||||
// idk if this is criterion's fault or rust's fault but the async benchmark doesn't compile
|
||||
// group.bench_function("Decode", |b| {
|
||||
// b.to_async(tokio::runtime::Runtime::new().unwrap();).iter(|| async {
|
||||
// decoded_src_stream.seek(SeekFrom::Start(0)).unwrap();
|
||||
// Tag::read(&mut decoded_src_stream).await.unwrap();
|
||||
// })
|
||||
// });
|
||||
group.bench_function("Decode", |b| {
|
||||
b.to_async(tokio::runtime::Runtime::new().unwrap())
|
||||
.iter(|| async {
|
||||
let mut owned_decoded_src_stream = decoded_src_stream.clone();
|
||||
owned_decoded_src_stream.seek(SeekFrom::Start(0)).unwrap();
|
||||
Tag::read(&mut owned_decoded_src_stream).await.unwrap();
|
||||
})
|
||||
});
|
||||
|
||||
group.bench_function("Encode", |b| {
|
||||
b.iter(|| {
|
||||
|
|
Loading…
Add table
Reference in a new issue