Skip to content

Commit 73a1808

Browse files
starknet_committer_cli: fix StorageArgs and refactor Dockerfile (#9787)
1 parent 1463c36 commit 73a1808

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

crates/starknet_committer_cli/src/bin/benchmark_run/Dockerfile

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,21 @@ USER committer_benchmark
2222
ENTRYPOINT [ "starknet_committer_cli", "storage-benchmark" ]
2323
# Default parameters for the storage benchmark:
2424
# - run with 1000000 block iterations
25-
# - use the provided storage directory and data directory (override for a persistent storage dir of
26-
# a specific node)
27-
# - checkpoint every 1000 blocks.
2825
# - generate 4000 state diffs (new leaves) per block.
29-
CMD ["1000000", \
30-
"--storage-path", "/mnt/pd-ssd-new/storage", \
31-
"--data-path", "/mnt/pd-ssd-new/committer_storage_benchmark", \
32-
"--checkpoint-interval", "1000" \
33-
"--n-diffs", "4000" \
26+
# - use cached mdbx storage with a cache size of 1000000.
27+
# - checkpoint every 1000 blocks.
28+
# - log level is info.
29+
# - use the provided data, storage, output and checkpoint directories (override for a persistent storage dir of
30+
# a specific node)
31+
32+
CMD ["--n-iterations", "1000000", \
33+
"--n-diffs", "4000", \
34+
"--storage-type", "cached-mdbx", \
35+
"--cache-size", "1000000", \
36+
"--checkpoint-interval", "1000", \
37+
"--log-level", "info", \
38+
"--data-path", "/mnt/data/committer_storage_benchmark", \
39+
"--storage-path", "/mnt/data/storage", \
40+
"--output-dir", "/mnt/data/csvs", \
41+
"--checkpoint-dir", "/mnt/data/checkpoints" \
3442
]

crates/starknet_committer_cli/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ struct StorageArgs {
3333
#[clap(short = 's', long, default_value = "42")]
3434
seed: u64,
3535
/// Number of iterations to run the benchmark.
36-
#[clap(default_value = "1000")]
36+
#[clap(long, default_value = "1000")]
3737
n_iterations: usize,
3838
/// Number of storage updates per iteration.
39-
#[clap(default_value = "1000")]
39+
#[clap(long, default_value = "1000")]
4040
n_diffs: usize,
4141
/// Storage impl to use. Note that MapStorage isn't persisted in the file system, so
4242
/// checkpointing is ignored.

0 commit comments

Comments
 (0)