Files
turso/Cargo.toml
Pekka Enberg d6543ac25c Merge 'Simulator Profiles' from Pedro Muniz
## Changes
- Refactor sql generation to always accept a `Context` trait object so
we can query the current Generation `Opts`. This change allows us to be
more granular in generating our sql statements. It also opens
opportunities for us to add even more knobs to tweak generation as
needed. I tried to make this as generic as possible as I believe this
library can be useful for fuzz testing outside the simulator.
- Introduce `Profile` struct that aggregates the different
configurations needed to execute the simulator. With this Profile struct
we can bias sql generation towards different statements and create
predefined profiles.
`WriteHeavy` Profile:
```rust
Profile {
            query: QueryProfile {
                gen_opts: Opts {
                    // TODO: in the future tweak blob size for bigger inserts
                    // TODO: increase number of rows as well
                    table: TableOpts {
                        large_table: LargeTableOpts {
                            large_table_prob: 0.4,
                            ..Default::default()
                        },
                        ..Default::default()
                    },
                    query: QueryOpts {
                        insert: InsertOpts {
                            min_rows: NonZeroU32::new(5).unwrap(),
                            max_rows: NonZeroU32::new(11).unwrap(),
                        },
                        ..Default::default()
                    },
                    ..Default::default()
                },
                select_weight: 30,
                insert_weight: 70,
                delete_weight: 0,
                update_weight: 0,
                ..Default::default()
            },
            ..Default::default()
        };
```
As you can see we disable the `delete` and `update` weights, decrease
`select` and increase `insert` weights. This means that we disable
updates and deletes in favor of inserting more data and checking the
validity of the database with fewer select statements.
- `Profile` and `Opts` are validated with `garde` and can generate json
schemas with `schemars` so that we can have editor integration when
creating new profiles to play with.
- Added some docs in the README explaining how you can add LSP
integration for the Json config by generating a `JsonSchema` file

Closes #2852
2025-09-01 10:26:33 +03:00

93 lines
2.6 KiB
TOML

# Copyright 2023-2025 the Limbo authors. All rights reserved. MIT license.
[workspace]
resolver = "2"
members = [
"bindings/dart/rust",
"bindings/java",
"bindings/javascript",
"bindings/python",
"bindings/rust",
"cli",
"core",
"extensions/completion",
"extensions/core",
"extensions/crypto",
"extensions/csv",
"extensions/ipaddr",
"extensions/percentile",
"extensions/regexp",
"extensions/tests",
"macros",
"simulator",
"sqlite3",
"stress",
"testing/sqlite_test_ext",
"tests",
"vendored/sqlite3-parser/sqlparser_bench",
"parser",
"sync/engine",
"sync/javascript",
"sql_generation",
]
exclude = ["perf/latency/limbo"]
[workspace.package]
version = "0.1.5-pre.1"
authors = ["the Limbo authors"]
edition = "2021"
license = "MIT"
repository = "https://github.com/tursodatabase/turso"
[workspace.dependencies]
turso = { path = "bindings/rust", version = "0.1.5-pre.1" }
turso_node = { path = "bindings/javascript", version = "0.1.5-pre.1" }
limbo_completion = { path = "extensions/completion", version = "0.1.5-pre.1" }
turso_core = { path = "core", version = "0.1.5-pre.1" }
turso_sync_engine = { path = "sync/engine", version = "0.1.5-pre.1" }
limbo_crypto = { path = "extensions/crypto", version = "0.1.5-pre.1" }
limbo_csv = { path = "extensions/csv", version = "0.1.5-pre.1" }
turso_ext = { path = "extensions/core", version = "0.1.5-pre.1" }
turso_ext_tests = { path = "extensions/tests", version = "0.1.5-pre.1" }
limbo_ipaddr = { path = "extensions/ipaddr", version = "0.1.5-pre.1" }
turso_macros = { path = "macros", version = "0.1.5-pre.1" }
limbo_percentile = { path = "extensions/percentile", version = "0.1.5-pre.1" }
limbo_regexp = { path = "extensions/regexp", version = "0.1.5-pre.1" }
turso_sqlite3_parser = { path = "vendored/sqlite3-parser", version = "0.1.5-pre.1" }
limbo_uuid = { path = "extensions/uuid", version = "0.1.5-pre.1" }
turso_parser = { path = "parser" }
sql_generation = { path = "sql_generation" }
strum = { version = "0.26", features = ["derive"] }
strum_macros = "0.26"
serde = "1.0"
serde_json = "1.0"
anyhow = "1.0.98"
mimalloc = { version = "0.1.47", default-features = false }
rusqlite = { version = "0.37.0", features = ["bundled"] }
itertools = "0.14.0"
rand = "0.9.2"
tracing = "0.1.41"
schemars = "1.0.4"
garde = "0.22"
[profile.release]
debug = "line-tables-only"
codegen-units = 1
panic = "abort"
lto = true
[profile.antithesis]
inherits = "release"
debug = true
codegen-units = 1
panic = "abort"
lto = true
[profile.bench-profile]
inherits = "release"
debug = true
[profile.dist]
inherits = "release"
lto = "thin"