memory-benchmark
Memory Benchmarking & Analysis
The perf/memory crate benchmarks memory usage of SQL workloads under WAL and MVCC journal modes. It uses dhat as the global allocator to track every heap allocation, and memory-stats for process-level RSS snapshots.
It also contains a stack-report helper binary for stack-usage investigations.
That binary runs a SQL payload with the stacker feature enabled and captures
turso_stack tracing events in-process, aggregating structured tracing fields
instead of parsing stderr log text.
Location
- Benchmark crate:
perf/memory/ - Analysis script:
perf/memory/analyze-dhat.py - dhat output:
dhat-heap.json(written to CWD after each run)
Running Stack Reports
Use this when investigating stack usage from SQL translation/execution probes.
Run stack reports in release mode with --features stacker when comparing
More from tursodatabase/turso
code-quality
General Correctness rules, Rust patterns, comments, avoiding over-engineering. When writing code always take these into account
1.0Kindex-knowledge
Generate hierarchical AGENTS.md knowledge base for a codebase. Creates root + complexity-scored subdirectory documentation.
657debugging
How to debug tursodb using Bytecode comparison, logging, ThreadSanitizer, deterministic simulation, and corruption analysis tools
631async-io-model
Explanations of common asynchronous patterns used in tursodb. Involves IOResult, state machines, re-entrancy pitfalls, CompletionGroup. Always use these patterns in `core` when doing anything IO
604storage-format
SQLite file format, B-trees, pages, cells, overflow, freelist that is used in tursodb
604testing
How to write tests, when to use each type of test, and how to run them. Contains information about conversion of `.test` to `.sqltest`, and how to write `.sqltest` and rust tests
598