Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,20 @@ jobs:
name:
- btreemap
- btreeset
# - io_chunks TODO: re-enable after new folder is merged.
- memory-manager
- vec
- compare
include:
- name: btreemap
project_dir: ./benchmarks/btreemap
- name: btreeset
project_dir: ./benchmarks/btreeset
# - name: io_chunks
# project_dir: ./benchmarks/io_chunks
- name: memory-manager
project_dir: ./benchmarks/memory_manager
- name: vec
project_dir: ./benchmarks/vec
- name: compare
project_dir: ./benchmarks/compare

env:
PROJECT_DIR: ${{ matrix.project_dir }}
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ name = "vec"
path = "vec/src/main.rs"

[[bin]]
name = "compare"
path = "compare/src/main.rs"
name = "io_chunks"
path = "io_chunks/src/main.rs"

[[bin]]
name = "btreeset"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
//! # I/O Chunks Benchmark
//!
//! Measures read/write performance across different stable storage approaches
//! when handling 100 MiB of data split into varying chunk sizes.
//!
//! Tests approaches:
//! - **Stable Memory**: Direct memory operations (baseline)
//! - **BTreeMap**: Key-value storage with chunk index as key
//! - **StableVec**: Sequential storage pushing chunks
//!
//! Each approach is tested with:
//! - 1 chunk (100 MiB)
//! - 1K chunks (~100 KiB each)
//! - 1M chunks (~100 B each)
//!
//! **Goal**: Evaluate how chunk size affects performance and compare
//! the overhead of stable structures versus raw memory operations.

use benchmarks::vec::BoundedVecN;
use canbench_rs::{bench, bench_fn, BenchResult};
use ic_cdk::api::stable::WASM_PAGE_SIZE_IN_BYTES;
Expand Down