summaryrefslogtreecommitdiffstats
path: root/benches/sync_rwlock.rs
diff options
context:
space:
mode:
Diffstat (limited to 'benches/sync_rwlock.rs')
-rw-r--r--benches/sync_rwlock.rs21
1 files changed, 8 insertions, 13 deletions
diff --git a/benches/sync_rwlock.rs b/benches/sync_rwlock.rs
index 30c66e49..46eeac0c 100644
--- a/benches/sync_rwlock.rs
+++ b/benches/sync_rwlock.rs
@@ -3,9 +3,8 @@ use std::sync::Arc;
use tokio::{sync::RwLock, task};
fn read_uncontended(b: &mut Bencher) {
- let rt = tokio::runtime::Builder::new()
- .core_threads(6)
- .threaded_scheduler()
+ let rt = tokio::runtime::Builder::new_multi_thread()
+ .worker_threads(6)
.build()
.unwrap();
@@ -22,9 +21,8 @@ fn read_uncontended(b: &mut Bencher) {
}
fn read_concurrent_uncontended_multi(b: &mut Bencher) {
- let rt = tokio::runtime::Builder::new()
- .core_threads(6)
- .threaded_scheduler()
+ let rt = tokio::runtime::Builder::new_multi_thread()
+ .worker_threads(6)
.build()
.unwrap();
@@ -51,8 +49,7 @@ fn read_concurrent_uncontended_multi(b: &mut Bencher) {
}
fn read_concurrent_uncontended(b: &mut Bencher) {
- let rt = tokio::runtime::Builder::new()
- .basic_scheduler()
+ let rt = tokio::runtime::Builder::new_current_thread()
.build()
.unwrap();
@@ -78,9 +75,8 @@ fn read_concurrent_uncontended(b: &mut Bencher) {
}
fn read_concurrent_contended_multi(b: &mut Bencher) {
- let rt = tokio::runtime::Builder::new()
- .core_threads(6)
- .threaded_scheduler()
+ let rt = tokio::runtime::Builder::new_multi_thread()
+ .worker_threads(6)
.build()
.unwrap();
@@ -108,8 +104,7 @@ fn read_concurrent_contended_multi(b: &mut Bencher) {
}
fn read_concurrent_contended(b: &mut Bencher) {
- let rt = tokio::runtime::Builder::new()
- .basic_scheduler()
+ let rt = tokio::runtime::Builder::new_current_thread()
.build()
.unwrap();