Skip to content

Commit

Permalink
fix bench
Browse files Browse the repository at this point in the history
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
  • Loading branch information
Little-Wallace committed Feb 23, 2024
1 parent e6d8d88 commit 4b48edf
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/storage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -87,7 +87,7 @@ mach2 = "0.4"
workspace-hack = { path = "../workspace-hack" }

[dev-dependencies]
criterion = { workspace = true, features = ["async_futures"] }
criterion = { workspace = true, features = ["async_futures", "async_tokio"] }
expect-test = "1"
moka = { version = "0.12", features = ["future"] }
risingwave_hummock_sdk = { workspace = true, features = ["enable_test_epoch"] }
10 changes: 5 additions & 5 deletions src/storage/benches/bench_compactor.rs
Original file line number Diff line number Diff line change
@@ -175,7 +175,7 @@ fn bench_table_scan(c: &mut Criterion) {

c.bench_function("bench_table_iterator", |b| {
let info1 = info.clone();
b.to_async(FuturesExecutor)
b.to_async(&runtime)
.iter(|| scan_all_table(&info1, sstable_store.clone()));
});
}
@@ -220,15 +220,15 @@ fn bench_merge_iterator_compactor(c: &mut Criterion) {
let sstable_store = mock_sstable_store();
let test_key_size = 256 * 1024;
let info1 = runtime
.block_on(async { build_table(sstable_store.clone(), 1, 0..test_key_size, 1).await });
.block_on(async { build_table(sstable_store.clone(), 1, 0..test_key_size/2, 1).await });
let info2 = runtime
.block_on(async { build_table(sstable_store.clone(), 2, 0..test_key_size, 1).await });
.block_on(async { build_table(sstable_store.clone(), 2, test_key_size/2 .. test_key_size, 1).await });
let level1 = vec![info1, info2];

let info1 = runtime
.block_on(async { build_table(sstable_store.clone(), 3, 0..test_key_size, 2).await });
.block_on(async { build_table(sstable_store.clone(), 3, 0..test_key_size/2, 2).await });
let info2 = runtime
.block_on(async { build_table(sstable_store.clone(), 4, 0..test_key_size, 2).await });
.block_on(async { build_table(sstable_store.clone(), 4, test_key_size/2 .. test_key_size, 2).await });
let level2 = vec![info1, info2];
let read_options = Arc::new(SstableIteratorReadOptions {
cache_policy: CachePolicy::Fill(CachePriority::High),

0 comments on commit 4b48edf

Please sign in to comment.