Skip to content

Commit

Permalink
test(blockifier): use the jemalloc allocator for benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
ArniStarkware committed Feb 3, 2025
1 parent ac9eee2 commit 2e96006
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/blockifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ rstest.workspace = true
rstest_reuse.workspace = true
starknet_api = { path = "../starknet_api", features = ["testing"] }
test-case.workspace = true
tikv-jemallocator.workspace = true

[build-dependencies]
starknet_infra_utils.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/blockifier/bench/blockifier_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ use blockifier::test_utils::transfers_generator::{
};
use criterion::{criterion_group, criterion_main, Criterion};

// Note, it might be interesting to run this benchmark with and without the Jemalloc allocator.
starknet_infra_utils::set_global_allocator!();

pub fn transfers_benchmark(c: &mut Criterion) {
let transfers_generator_config = TransfersGeneratorConfig {
recipient_generator_type: RecipientGeneratorType::Random,
Expand Down

0 comments on commit 2e96006

Please sign in to comment.