bench: encode without compress

This commit is contained in:
leeeon233 2023-02-20 19:16:02 +08:00
parent af6342a52d
commit 379c3201f5

View file

@ -120,11 +120,11 @@ mod run {
}); });
b.bench_function("B4_encode_snapshot", |b| { b.bench_function("B4_encode_snapshot", |b| {
b.iter(|| { b.iter(|| {
let _ = loro.encode_all(); let _ = loro.encode_with_cfg(EncodeConfig::snapshot().without_compress());
}) })
}); });
b.bench_function("B4_decode_snapshot", |b| { b.bench_function("B4_decode_snapshot", |b| {
let buf = loro.encode_all(); let buf = loro.encode_with_cfg(EncodeConfig::snapshot().without_compress());
let mut store2 = LoroCore::default(); let mut store2 = LoroCore::default();
b.iter(|| { b.iter(|| {
store2.decode(&buf).unwrap(); store2.decode(&buf).unwrap();