Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(blockifier): use the jemalloc allocator for benchmark #3899

Merged
merged 1 commit into from
Feb 3, 2025
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
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
6 changes: 6 additions & 0 deletions crates/blockifier/bench/blockifier_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ use blockifier::test_utils::transfers_generator::{
TransfersGeneratorConfig,
};
use criterion::{criterion_group, criterion_main, Criterion};
use starknet_infra_utils::set_global_allocator;

// TODO(Arni): Consider how to run this benchmark both with and without setting the allocator. Maybe
// hide this macro call under a feature, and run this benchmark regularly or with
// `cargo bench --bench blockifier_bench --feature=specified_allocator`
set_global_allocator!();

pub fn transfers_benchmark(c: &mut Criterion) {
let transfers_generator_config = TransfersGeneratorConfig {
Expand Down
Loading