Commit Graph

80 Commits

Author SHA1 Message Date
pedrocarlo
baf649affb add insert randomblob benchmark 2025-10-20 14:47:47 -03:00
Nikita Sivukhin
8dae601fac make rollback non-failing method 2025-10-06 13:21:45 +04:00
Jussi Saurio
509bde109e mvcc benchmark compilation fix 2025-09-30 22:27:28 +03:00
Jussi Saurio
949e6dd728 mvcc: remove unused states and fields from CommitStateMachine
none of the pager commit related data and logic are used anymore,
so let's delete them.
2025-09-25 08:12:12 +03:00
Jussi Saurio
4af49ef98c mvcc: simplify StateMachine
TransitionResult is an internal implementation detail that tells
an invocation of StateMachine::step() to continue looping, but it
is of no use to other callers.

For this reason, just return an IOResult from StateMachine::step()
which simplifies the result handling.
2025-09-22 16:37:31 +03:00
Jussi Saurio
d493a72cc0 dont unwrap begin_tx 2025-09-15 14:48:26 +03:00
Jussi Saurio
8f43741513 fix mvcc rollback
executing ROLLBACK did not rollback the mv-store transaction
2025-09-15 09:29:08 +03:00
Jussi Saurio
db3428a7a9 remove unused pager parameter 2025-09-14 23:44:24 +03:00
Pere Diaz Bou
ec2cff2026 benchmark: introduce simple 1 thread concurrent benchmark for mvcc/sqlite/wal
This is considerably simpler with 1 thread as we just try to yield
control when I/O happens and we only run io.run_once when all
connections tried to do some work. This allows connections to
cooperatively progress.
2025-09-12 14:02:57 +00:00
Piotr Rzysko
ab0f673f44 Add benchmark for result column expression handling
The new query combines multiple aggregate functions, plain columns,
arithmetic expressions, and aggregates wrapped in additional expressions.

Local run results:
```
Prepare `SELECT first_name, last_name, state, city, age + 10, LENGTH(email), UPPER(first_name), LOWE...
                        time:   [64.535 µs 64.623 µs 64.713 µs]
Found 9 outliers among 100 measurements (9.00%)
  4 (4.00%) high mild
  5 (5.00%) high severe
```
2025-09-02 08:22:36 +02:00
pedrocarlo
fbe7e685ce adjust mvcc code to return completions in state machines 2025-08-13 10:24:55 +03:00
pedrocarlo
217c9061e8 advance commit_tx state machine in mvcc tests 2025-08-12 12:28:35 -03:00
Piotr Rzysko
40a8058083 Use mimalloc in benchmark.rs 2025-08-11 08:02:35 +02:00
Jussi Saurio
aea6d942d6 bench/insert: fix expected return value from pragma 2025-08-07 17:44:46 +03:00
Jussi Saurio
95c6c7581b bench/insert: use PRAGMA synchronous=full
synchronous=FULL means WAL is fsynced on every commit,
which is what we also do.

however we do not do the padding to sector alignment that
sqlite does (see #2450), which makes sqlite do more work
than we do.
2025-08-07 13:40:14 +03:00
Jussi Saurio
ff128e2f20 bench/insert: use locking_mode EXCLUSIVE and journal_mode=WAL for sqlite 2025-08-06 21:40:43 +03:00
Levy A.
3bc1001a93 feat(bench): complete ALTER TABLE benchmarks 2025-08-06 13:38:26 -03:00
Levy A.
b9a3a93ef0 fix: clippy 2025-08-02 20:06:05 -03:00
Levy A.
b14a11a2fd fix: change name for schema btree + fix benchmark 2025-08-02 17:17:36 -03:00
Levy A.
1e177053cb feat: add RenameTable instruction
direct schema mutation, no reparsing
2025-08-01 21:11:25 -03:00
Pere Diaz Bou
0cefb01395 mvcc_benchmark: clippy 2025-08-01 11:01:29 +02:00
Pere Diaz Bou
c807b035c5 core/mvcc: fix tests again
had to create connections for every different txn
2025-08-01 10:44:19 +02:00
Levy A.
cf91e36ed3 fix: force sqlite to parse schema on connection benchmark 2025-07-31 13:24:59 -03:00
Jussi Saurio
3a861e1618 bench: add insert benchmark (batch sizes: 1,10,100) 2025-07-15 13:41:56 +03:00
Nils Koch
828d4f5016 fix clippy errors for rust 1.88.0 (auto fix) 2025-07-12 18:58:41 +03:00
Levy A.
a479d0d5e8 prevent calling to_uppercase 2025-07-11 15:04:28 -03:00
Levy A.
9c0e850622 add connection benchmark 2025-07-11 15:04:24 -03:00
pedrocarlo
711b1ef114 make all run_once be run under statement or connection so that rollback is called 2025-07-07 11:51:25 -03:00
Pekka Enberg
9c1b7897ac Fix URLs to point to github.com/tursodatabase/turso 2025-06-30 11:23:53 +03:00
Pekka Enberg
53ba3ff926 Rename limbo_core crate to turso_core 2025-06-29 09:59:17 +03:00
Pekka Enberg
2fc5c0ce5c Switch to runtime flag for enabling indexes
Makes it easier to test the feature:

```
$ cargo run --  --experimental-indexes
Limbo v0.0.22
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database
limbo> CREATE TABLE t(x);
limbo> CREATE INDEX t_idx ON t(x);
limbo> DROP INDEX t_idx;
```
2025-06-26 10:07:28 +03:00
Nils Koch
2827b86917 chore: fix clippy warnings 2025-06-23 19:52:13 +01:00
pedrocarlo
1c4af7d0aa change sample count to 10 2025-05-23 12:37:03 -03:00
pedrocarlo
66f82e47f5 tpc-h with criterion and nyrkio 2025-05-23 01:32:16 -03:00
pedrocarlo
7508043b62 add bench for select count 2025-05-10 22:23:01 -03:00
Ihor Andrianov
db5e364210 made json an optional module again 2025-03-30 19:01:03 +03:00
Ihor Andrianov
a983c979c6 jsonb_merge, json_group_array, json_group_object 2025-03-30 18:47:33 +03:00
Ihor Andrianov
1daab8cd7c add bench to check json cache 2025-03-24 13:17:57 +02:00
Pere Diaz Bou
13d518d086 fragment bench functions 2025-03-19 17:55:24 +01:00
Ihor Andrianov
37c2655b6f Add jsonb bench 2025-03-14 19:46:29 +02:00
Pekka Enberg
96175cccf7 cli: Add --experimental-mvcc option to enable MVCC 2025-03-06 10:16:42 +02:00
Pekka Enberg
81b79bc833 core/mvcc: Eliminate row generic types
The logging code that writes out transactions to disk needs to write out
the byte array that we actually use. The code is less hairly without the
generics so drop them.
2025-03-05 19:17:16 +02:00
Pere Diaz Bou
8daf7666d1 Make database Sync + Send 2025-03-05 14:07:48 +01:00
Gustavo Sverzut Barbieri
cd2d817c10 github.com/penberg/limbo was moved to github.com/tursodatabase/limbo
Adjust all the references since they were broken
2025-02-08 10:21:49 -03:00
Pekka Enberg
7809df913a core/mvcc: Rename Database to MvStore 2025-02-07 07:40:33 +02:00
Pekka Enberg
c210821100 core: Move result row to ProgramState
Move result row to `ProgramState` to mimic what SQLite does where `Vdbe`
struct has a `pResultRow` member. This makes it easier to deal with result
lifetime, but more importantly, eventually lazily parse values at the edges of
the API.
2025-02-06 11:52:26 +02:00
Pekka Enberg
5870c92e9e core/mvcc: Fix MVCC benchmark SIGKILL
The `begin_tx` benchmark makes no sense because it just fills up memory with
transaction metadata, eventually killing the process...
2025-02-05 13:33:38 +02:00
Pekka Enberg
fad479ac59 core/mvcc: Move source code to module 2025-02-05 13:25:16 +02:00
Pekka Enberg
a045866a6c Merge 'core: Fix benchmark panic if syscall is interrupted' from Pekka Enberg
Fixes the following panics:
Benchmarking Execute `SELECT * FROM users LIMIT ?`/Limbo/100: Profiling
for 5.0000 sthread 'main' panicked at core/benches/benchmark.rs:69:43:
called `Result::unwrap()` on an `Err` value: IOError(Os { code: 4, kind:
Interrupted, message: "Interrupted system call" })
note: run with `RUST_BACKTRACE=1` environment variable to display a
backtrace

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #882
2025-02-04 18:25:34 +02:00
Pekka Enberg
097e56c19f core: Kill Statement::query() method
It's a pointless wrapper on top of `step()` that introduce additional
memory allocation and deallocation.
2025-02-04 13:46:11 +02:00