diff --git a/simulator/profiles/io.rs b/simulator/profiles/io.rs index b24987916..4bca40b8f 100644 --- a/simulator/profiles/io.rs +++ b/simulator/profiles/io.rs @@ -1,7 +1,7 @@ #[derive(Debug, Clone)] pub struct IOProfile { - enable: bool, - latency: LatencyProfile, + pub enable: bool, + pub latency: LatencyProfile, } impl Default for IOProfile { @@ -15,13 +15,13 @@ impl Default for IOProfile { #[derive(Debug, Clone)] pub struct LatencyProfile { - enable: bool, + pub enable: bool, /// Added IO latency probability - latency_probability: usize, + pub latency_probability: usize, /// Minimum tick time in microseconds for simulated time - min_tick: u64, + pub min_tick: u64, /// Maximum tick time in microseconds for simulated time - max_tick: u64, + pub max_tick: u64, } impl Default for LatencyProfile { diff --git a/simulator/profiles/mod.rs b/simulator/profiles/mod.rs index a4192602d..6e5187836 100644 --- a/simulator/profiles/mod.rs +++ b/simulator/profiles/mod.rs @@ -1,5 +1,22 @@ +use crate::profiles::{io::IOProfile, query::QueryProfile}; + mod io; mod query; -#[derive(Debug, Default, Clone)] -pub struct Profile {} +#[derive(Debug, Clone)] +pub struct Profile { + /// Experimental MVCC feature + pub experimental_mvcc: bool, + pub io: IOProfile, + pub query: QueryProfile, +} + +impl Default for Profile { + fn default() -> Self { + Self { + experimental_mvcc: false, + io: Default::default(), + query: Default::default(), + } + } +} diff --git a/simulator/profiles/query.rs b/simulator/profiles/query.rs index 919b8ecd5..0b1c663c3 100644 --- a/simulator/profiles/query.rs +++ b/simulator/profiles/query.rs @@ -1,6 +1,16 @@ +#[derive(Debug, Default, Clone)] +pub struct QueryProfile { + pub create_table: CreateTableProfile, + pub create_index: CreateIndexProfile, + pub insert: InsertProfile, + pub update: UpdateProfile, + pub delete: DeleteProfile, + pub drop_table: DropTableProfile, +} + #[derive(Debug, Clone)] pub struct CreateTableProfile { - enable: bool, + pub enable: bool, } impl Default for CreateTableProfile { @@ -11,7 +21,7 @@ impl Default for CreateTableProfile { #[derive(Debug, Clone)] pub struct CreateIndexProfile { - enable: bool, + pub enable: bool, } impl Default for CreateIndexProfile { @@ -22,7 +32,7 @@ impl Default for CreateIndexProfile { #[derive(Debug, Clone)] pub struct InsertProfile { - enable: bool, + pub enable: bool, } impl Default for InsertProfile { @@ -33,7 +43,7 @@ impl Default for InsertProfile { #[derive(Debug, Clone)] pub struct UpdateProfile { - enable: bool, + pub enable: bool, } impl Default for UpdateProfile { @@ -44,7 +54,7 @@ impl Default for UpdateProfile { #[derive(Debug, Clone)] pub struct DeleteProfile { - enable: bool, + pub enable: bool, } impl Default for DeleteProfile { @@ -55,7 +65,7 @@ impl Default for DeleteProfile { #[derive(Debug, Clone)] pub struct DropTableProfile { - enable: bool, + pub enable: bool, } impl Default for DropTableProfile {