forked from iopsystems/rpc-perf
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-organize the various client types to provide more coherent structure.
- Loading branch information
Showing
75 changed files
with
106 additions
and
644 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
src/clients/memcache/mod.rs → src/clients/cache/memcache/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
use crate::workload::ClientRequest; | ||
use crate::*; | ||
|
||
use async_channel::Receiver; | ||
use tokio::io::*; | ||
use tokio::runtime::Runtime; | ||
use tokio::time::{timeout, Duration}; | ||
use workload::ClientWorkItemKind; | ||
|
||
use std::io::{Error, ErrorKind, Result}; | ||
use std::time::Instant; | ||
|
||
mod memcache; | ||
mod momento; | ||
mod redis; | ||
|
||
pub fn launch( | ||
config: &Config, | ||
work_receiver: Receiver<ClientWorkItemKind<ClientRequest>>, | ||
) -> Option<Runtime> { | ||
debug!("Launching clients..."); | ||
|
||
config.client()?; | ||
|
||
// spawn the request drivers on their own runtime | ||
let mut client_rt = Builder::new_multi_thread() | ||
.enable_all() | ||
.worker_threads(config.client().unwrap().threads()) | ||
.build() | ||
.expect("failed to initialize tokio runtime"); | ||
|
||
match config.general().protocol() { | ||
Protocol::Memcache => { | ||
memcache::launch_tasks(&mut client_rt, config.clone(), work_receiver) | ||
} | ||
Protocol::Momento => { | ||
momento::launch_tasks(&mut client_rt, config.clone(), work_receiver) | ||
} | ||
Protocol::Ping => { | ||
crate::clients::ping::ascii::launch_tasks(&mut client_rt, config.clone(), work_receiver) | ||
} | ||
Protocol::Resp => { | ||
redis::launch_tasks(&mut client_rt, config.clone(), work_receiver) | ||
} | ||
protocol => { | ||
error!("keyspace is not supported for the {:?} protocol", protocol); | ||
std::process::exit(1); | ||
} | ||
} | ||
|
||
Some(client_rt) | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
use super::*; | ||
use crate::clients::*; | ||
|
||
use ::momento::cache::configurations::LowLatency; | ||
use ::momento::*; | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.