mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-04 00:44:19 +01:00
add 10 connections to base profiles
This commit is contained in:
@@ -28,17 +28,19 @@ pub struct Profile {
|
||||
#[garde(skip)]
|
||||
/// Experimental MVCC feature
|
||||
pub experimental_mvcc: bool,
|
||||
#[garde(range(min = 1))]
|
||||
pub max_connections: usize,
|
||||
#[garde(dive)]
|
||||
pub io: IOProfile,
|
||||
#[garde(dive)]
|
||||
pub query: QueryProfile,
|
||||
}
|
||||
|
||||
#[allow(clippy::derivable_impls)]
|
||||
impl Default for Profile {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
experimental_mvcc: false,
|
||||
max_connections: 10,
|
||||
io: Default::default(),
|
||||
query: Default::default(),
|
||||
}
|
||||
|
||||
@@ -192,8 +192,6 @@ impl SimulatorEnv {
|
||||
let opts = SimulatorOpts {
|
||||
seed,
|
||||
ticks: rng.random_range(cli_opts.minimum_tests..=cli_opts.maximum_tests),
|
||||
max_connections: 1, // TODO: for now let's use one connection as we didn't implement
|
||||
// correct transactions processing
|
||||
max_tables: rng.random_range(0..128),
|
||||
disable_select_optimizer: cli_opts.disable_select_optimizer,
|
||||
disable_insert_values_select: cli_opts.disable_insert_values_select,
|
||||
@@ -280,7 +278,7 @@ impl SimulatorEnv {
|
||||
}
|
||||
};
|
||||
|
||||
let connections = (0..opts.max_connections)
|
||||
let connections = (0..profile.max_connections)
|
||||
.map(|_| SimConnection::Disconnected)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
@@ -387,7 +385,6 @@ impl Display for SimConnection {
|
||||
pub(crate) struct SimulatorOpts {
|
||||
pub(crate) seed: u64,
|
||||
pub(crate) ticks: usize,
|
||||
pub(crate) max_connections: usize,
|
||||
pub(crate) max_tables: usize,
|
||||
|
||||
pub(crate) disable_select_optimizer: bool,
|
||||
|
||||
Reference in New Issue
Block a user