Skip to content

Commit

Permalink
Increase runtime memory stack size
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiemh committed Sep 24, 2024
1 parent b27e2a3 commit 62edb05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crud-bench/src/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ impl Benchmark {
s.spawn(move |_| {
let mut record_provider = RecordProvider::default();
let runtime = Builder::new_multi_thread()
.thread_stack_size(10 * 1024 * 1024) // Set stack size to 10MiB
.worker_threads(4) // Set the number of worker threads
.enable_all() // Enables all runtime features, including I/O and time
.build()
Expand Down Expand Up @@ -148,11 +149,11 @@ impl Benchmark {
}
}
match operation {
BenchmarkOperation::Read => client.read(sample).await?,
BenchmarkOperation::Create => {
let record = record_provider.sample();
client.create(sample, record).await?;
}
BenchmarkOperation::Read => client.read(sample).await?,
BenchmarkOperation::Update => {
let record = record_provider.sample();
client.update(sample, record).await?;
Expand Down

0 comments on commit 62edb05

Please sign in to comment.