alpaylan
833c75080b
break up the simulator primitives into their own files in the simulator submodule
2024-12-22 17:16:50 -05:00
alpaylan
9f08b621ec
add clap CLI for configuring the simulator
2024-12-22 17:06:46 -05:00
alpaylan
d2723b777b
update table create probability, print interactions as info logs
2024-12-20 12:18:03 -05:00
Alperen Keleş
54c3423fec
Merge branch 'tursodatabase:main' into main
2024-12-20 12:17:10 -05:00
alpaylan
b355568023
use ticks as the main simulator driver, handle disconnects correctly, add multi-connection setup
2024-12-19 23:40:04 -05:00
Pekka Enberg
e93ac38e55
Add statement interruption support
...
This adds an interrupt() method to Statement that allows apps to
interrupt a running statement. Please note that this is different from
`sqlite3_interrupt()` which interrupts all ongoing operations in a
database. Although we want to support that too, per statement interrupt
is much more useful to apps.
2024-12-19 12:30:32 +02:00
alpaylan
cb20ca7e40
fix formatting
2024-12-18 17:10:18 -05:00
alpaylan
39b5dbed55
change gen.range based queries into frequency and one_of calls
2024-12-18 17:09:44 -05:00
alpaylan
66e7a4edec
fix formatting
2024-12-17 18:30:55 -05:00
alpaylan
7d4d803a13
implement interaction plans
2024-12-17 18:24:39 -05:00
alpaylan
53ecedaceb
fix formatting
2024-12-16 10:49:56 -05:00
alpaylan
be18c6e8f0
break simulator into parts, add readme
2024-12-16 10:49:05 -05:00
alpaylan
0172c512ac
fix formatting
2024-12-15 12:51:01 -05:00
alpaylan
ec1c796650
change the boolean name to a more descriptive version
2024-12-15 12:50:38 -05:00
alpaylan
8e094de6aa
fix random character generation
2024-12-14 14:57:32 -05:00
alpaylan
a1b2ab3f54
change names to more descriptive versions, fix the equal row comparison to check the ordering
2024-12-14 14:46:22 -05:00
alpaylan
31fcdb8727
add workload percentage back to the simulator, fix the smaller/larger UTF8 string generator
2024-12-14 14:46:22 -05:00
Alperen Keleş
5284603c6e
Merge branch 'tursodatabase:main' into main
2024-12-14 14:46:12 -05:00
alpaylan
8cb7086bfc
formatting changes
2024-12-13 16:08:50 -05:00
alpaylan
ab556032f5
change the names of guard to predicate, arbitrary_of to arbitrary_from, ArbitraryOf to ArbitraryFrom
2024-12-13 16:07:56 -05:00
alpaylan
2d712d2b35
update simulator to randomly pick an action and check its postconditions
2024-12-13 15:59:16 -05:00
alpaylan
6029fc6303
fix formatting errors
2024-12-13 07:56:41 -05:00
alpaylan
c51de732c8
- added Arbitrary and ArbitraryOf<T> traits for mroe centralized generation
...
- implemented random generation for tables and structured queries
2024-12-13 07:51:47 -05:00
Pere Diaz Bou
a4297702bd
extract page cache to be multi threaded
2024-12-13 13:09:13 +01:00
Lauri Virtanen
afeb1cbe74
Clippy warning fixes
2024-11-24 20:24:47 +02:00
Lauri Virtanen
a7100d8e9b
Autofix clippy issues with cargo fix --clippy
2024-11-24 20:24:47 +02:00
Pekka Enberg
f8667bb160
simulator: Remove seed from SimulatorOpts
...
It's not used anywhere and technically it's not even part of simulation
options, but the seed that generates them.
2024-11-20 11:55:49 +02:00
Pekka Enberg
39ca03a7ce
simulator: Remove unused imports from main.rs
2024-11-20 11:55:49 +02:00
Pekka Enberg
a3078079b4
simulator: Fix clone() on double reference
...
Switch to to_string() and to_vec() instead of clone() + to_owned() to
fix the following warnings:
warning: using `.clone()` on a double reference, which returns `&String` instead of cloning the inner type
--> simulator/main.rs:348:68
|
348 | limbo_core::Value::Text(t) => Value::Text(t.clone().to_owned()),
| ^^^^^^^^
|
= note: `#[warn(suspicious_double_ref_op)]` on by default
warning: using `.clone()` on a double reference, which returns `&Vec<u8>` instead of cloning the inner type
--> simulator/main.rs:349:68
|
349 | limbo_core::Value::Blob(b) => Value::Blob(b.clone().to_owned()),
2024-11-20 11:55:49 +02:00
Pere Diaz Bou
e0e2ae9078
print stats
2024-11-19 17:54:32 +01:00
Pere Diaz Bou
269207d5db
add rows to env and blob fix
2024-11-19 17:40:42 +01:00
Pere Diaz Bou
f5a1f7c800
various fixes in btree
...
* read_u8 now takes self.offset into account
* shift cell pointers left on balance_root with offset > 0
* fix wrong writes to page in degragment_page
2024-11-19 17:15:19 +01:00
Pere Diaz Bou
999787b320
query print threshold, reduce ratio of big texts
2024-11-18 16:24:12 +01:00
Pere Diaz Bou
4aa5612334
fix schema query
2024-11-18 14:06:50 +01:00
Pere Diaz Bou
44e22c50cf
sim: improve simulator
2024-11-18 13:40:37 +01:00
Pere Diaz Bou
e2276c2e9d
O_DIRECT disable on WAL
2024-11-13 13:45:42 +00:00
Pere Diaz Bou
0b46648c0e
write wal header on init
2024-11-07 13:29:57 +01:00
Pere Diaz Bou
8eb3c89227
wasm,sim fixes
2024-11-05 15:41:30 +01:00
Pere Diaz Bou
f43e53a815
fix wasm and simulator wal impl
2024-11-05 15:29:54 +01:00
Pere Diaz Bou
f66e3925f3
fix imports
2024-11-05 15:29:54 +01:00
Pere Diaz Bou
f009eb35c6
suspendable checkpoint
2024-11-05 15:29:54 +01:00
Arpit Saxena
93092fb552
Improve Simulator IO by handing RowResult::IO
...
We inject fault before calling next_row() through which we'll get pread
faults. Also we call io's run_once on getting RowResult::IO. This is run
with a fault probability of 1%. This is less because a fault here would
result us in terminating the entire loop iterating on rows, and also
because realistically we'll expect less faults here
2024-09-26 20:00:55 +05:30
김선우
28884181be
Fix clippy
2024-09-15 16:23:27 +09:00
mazchew
671b61ba19
add time querying to io trait
2024-08-25 22:55:15 +08:00
mazchew
156005694a
added rng to io trait for simulation
2024-08-22 23:24:02 +08:00
Pekka Enberg
6a62e03a7d
simulator: Silence unused variable warning
2024-08-01 09:12:53 +03:00
Pere Diaz Bou
2b221d2b3c
fix conflicts
...
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
2024-07-31 17:38:33 +02:00
Pekka Enberg
351242561d
Kill anyhow usage
...
Switch anyhow to explicit `LimboError` type using thiserror crate, which
lets us make error handling more structured.
2024-07-25 17:15:08 +03:00
jussisaurio
588ab1af06
Run formatting and enforce formatting in CI
2024-07-23 23:14:36 +03:00
Pekka Enberg
330c6fde45
Improve simulator a bit
...
Still not very useful, but at least faults are getting injected.
2024-07-23 15:27:23 +03:00