mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 23:44:38 +00:00
rename benchmarks
This commit is contained in:
parent
95e9ec51dc
commit
350bbac282
3 changed files with 12 additions and 12 deletions
|
@ -38,4 +38,4 @@ debug = true
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
harness = false
|
harness = false
|
||||||
name = "my_benchmark"
|
name = "nbt"
|
||||||
|
|
|
@ -26,12 +26,12 @@ fn bench_file(filename: &str, c: &mut Criterion) {
|
||||||
|
|
||||||
group.throughput(Throughput::Bytes(decoded_src.len() as u64));
|
group.throughput(Throughput::Bytes(decoded_src.len() as u64));
|
||||||
|
|
||||||
group.bench_function("Decode", |b| {
|
// group.bench_function("Decode", |b| {
|
||||||
b.iter(|| {
|
// b.iter(|| {
|
||||||
black_box(Tag::read(&mut decoded_src_stream).unwrap());
|
// black_box(Tag::read(&mut decoded_src_stream).unwrap());
|
||||||
decoded_src_stream.set_position(0);
|
// decoded_src_stream.set_position(0);
|
||||||
})
|
// })
|
||||||
});
|
// });
|
||||||
|
|
||||||
group.bench_function("Encode", |b| {
|
group.bench_function("Encode", |b| {
|
||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
|
@ -42,12 +42,12 @@ fn bench_file(filename: &str, c: &mut Criterion) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn bench(c: &mut Criterion) {
|
fn bench(c: &mut Criterion) {
|
||||||
bench_file("tests/bigtest.nbt", c);
|
// bench_file("tests/bigtest.nbt", c);
|
||||||
bench_file("tests/simple_player.dat", c);
|
// bench_file("tests/simple_player.dat", c);
|
||||||
bench_file("tests/complex_player.dat", c);
|
bench_file("tests/complex_player.dat", c);
|
||||||
bench_file("tests/level.dat", c);
|
// bench_file("tests/level.dat", c);
|
||||||
bench_file("tests/stringtest.nbt", c);
|
// bench_file("tests/stringtest.nbt", c);
|
||||||
bench_file("tests/inttest.nbt", c);
|
// bench_file("tests/inttest.nbt", c);
|
||||||
}
|
}
|
||||||
|
|
||||||
criterion_group!(benches, bench);
|
criterion_group!(benches, bench);
|
Loading…
Add table
Add a link
Reference in a new issue