diff --git a/src/config/oltp.rs b/src/config/oltp.rs new file mode 100644 index 0000000..d942d13 --- /dev/null +++ b/src/config/oltp.rs @@ -0,0 +1,19 @@ +use super::*; + +#[derive(Clone, Deserialize)] +pub struct Oltp { + /// The number of connections this process will have to each endpoint. + poolsize: usize, + // number of threads for oltp tasks + threads: usize, +} + +impl Oltp { + pub fn threads(&self) -> usize { + self.threads + } + + pub fn poolsize(&self) -> usize { + std::cmp::max(1, self.poolsize) + } +}