mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-31 13:54:27 +01:00
cleanup
Co-authored-by: Mikaël Francoeur <mikael.francoeur@hotmail.com> cleanup Co-authored-by: Mikaël Francoeur <mikael.francoeur@hotmail.com>
This commit is contained in:
@@ -88,7 +88,7 @@ fn random_create_index<R: rand::Rng + ?Sized>(
|
||||
fn random_pragma<R: rand::Rng + ?Sized>(rng: &mut R, _conn_ctx: &impl GenerationContext) -> Query {
|
||||
const ALL_MODES: [VacuumMode; 2] = [
|
||||
VacuumMode::None,
|
||||
// VacuumMode::Incremental, not implemented yer
|
||||
// VacuumMode::Incremental, not implemented yet
|
||||
VacuumMode::Full,
|
||||
];
|
||||
|
||||
@@ -162,6 +162,8 @@ impl QueryDiscriminants {
|
||||
fn weight(&self, remaining: &Remaining) -> u32 {
|
||||
match self {
|
||||
QueryDiscriminants::Create => remaining.create,
|
||||
// remaining.select / 3 is for the random_expr generation
|
||||
// have a max of 1 so that we always generate at least a non zero weight for `QueryDistribution`
|
||||
QueryDiscriminants::Select => (remaining.select + remaining.select / 3).max(1),
|
||||
QueryDiscriminants::Insert => remaining.insert,
|
||||
QueryDiscriminants::Delete => remaining.delete,
|
||||
|
||||
@@ -71,5 +71,4 @@ pub enum QueryTypes {
|
||||
Update,
|
||||
Delete,
|
||||
DropTable,
|
||||
pragma_weight,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user