memory-benchmark

memory-benchmark is a skill for Claude Code, Codex from tursodatabase/turso. It costs 120 tokens per session (3,900 once invoked), scanned A, original, MIT.

A toolkit for measuring and investigating memory use in Turso, a database project. It measures heap allocations and process memory while running SQL workloads under different journal modes.

In plain words
What is it for?
Use it to benchmark read-heavy or mixed SQL workloads, inspect heap-allocation reports with dhat, compare process memory snapshots, and investigate stack usage.
Why use it?
It shows how much memory database operations allocate and helps identify memory regressions or the code paths responsible for high usage.

Skill for Claude CodeCodex

About the project

Turso is an in-process SQL database written in Rust that is compatible with SQLite and also accepts PostgreSQL syntax through an experimental frontend. It is for applications and organizations that need an embeddable database engine with support for multiple languages, platforms, and database features. The catalogue entries are skills and instructions for working with Turso.

tursodatabase/turso · 24,093 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/tursodatabase/turso/memory-benchmark
Any agent
npx skills add tursodatabase/turso --skill memory-benchmark
Clone the repo
git clone --depth 1 https://github.com/tursodatabase/turso

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memory-benchmark

README.md
[![agentmods](https://agentmods.dev/badge/skills/tursodatabase/turso/memory-benchmark.svg)](https://agentmods.dev/skills/tursodatabase/turso/memory-benchmark)
Your own site
<a href="https://agentmods.dev/skills/tursodatabase/turso/memory-benchmark"><img src="https://agentmods.dev/badge/skills/tursodatabase/turso/memory-benchmark.svg" alt="Measured on agentmods" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,900 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00120 $0.03900
Opus 5 $0.00060 $0.01950
Sonnet 5 $0.00024 $0.00780
Haiku 4.5 $0.00012 $0.00390

Measured 5d ago against content hash ecf7fbbdbe9c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory-benchmark scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/memory-benchmark/SKILL.md · 319 lines

How it starts

The opening of the file, as written. The whole thing — 319 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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/
  • CodSpeed bench crate: perf/memory/codspeed/ (CI allocation regression tracking)
  • Analysis script: perf/memory/analyze-dhat.py
  • dhat output: dhat-heap.json (written to CWD after each run)

The crate is split into a library and binaries. The workload engine lives in memory_benchmark::workload (run_workload, WorkloadConfig, WorkloadObserver, the JournalMode/WorkloadProfile enums and create_profile); the memory-benchmark bin is a thin CLI over it that adds dhat/RSS measurement. Randomized profiles (read-heavy, mixed) use a fixed RNG seed (profile::WORKLOAD_RNG_SEED) so workloads are identical across runs.

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 against server logs or CI stack-size output. Debug builds can materially overstate stack deltas and should only be used for quick local iteration.

cargo run --release -q -p memory-benchmark --features stacker --bin stack-report -- \
  --sql path/to/payload.sql \
  --top 40

Useful options:

--sql FILE|-             # SQL payload, or stdin with -
--format human|json|csv  # output format
--top N                  # aggregate/span rows per statement in human output
--statement N[,N...]     # only include reports for 1-based statement indexes
--sql-contains TEXT      # only include reports for statements containing TEXT, ASCII case-insensitive

Read the full file on GitHub · 319 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 319 lines · 120 tokens per session scan A ecf7fbbdbe9c

Subscribe to this mod's changes

memory-benchmark is a skill published in the GitHub repository tursodatabase/turso (24,093 stars, last pushed 5d ago), licensed MIT. It adds 120 tokens to every session and 3,900 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

chdb-datastore

Use when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas. Provides chDB DataStore — same pandas API, ClickHouse engine underneath. Also handles reading from S3, MySQL, PostgreSQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake…

chdb-io/chdb · 168 tokens

chdb-sql

Use when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake) without setting up a server. Provides chDB — embedded ClickHouse SQL in Python with 1000+ functions, Session for…

chdb-io/chdb · 214 tokens

duckdb

Use when analytical SQL must run in-process with no server: Parquet/CSV/JSON/Arrow queried in place, OLAP embedded in an app or notebook, a slow pandas groupby on multi-GB data, or S3/lakehouse data read without downloading. NOT a multi-user analytics server (that is clickhouse-analytics), NOT an app's transactional…

ericrisco/rsc-harness · 85 tokens

review-pr

Review a GitHub pull request or local Git range against QuestDB coding standards.

questdb/questdb · 18 tokens

analyze-issue

Used to analyze Apache ShardingSphere community issues. Emphasizes root-cause-first and evidence-first classification before conclusions, and produces copy-ready GitHub issue replies in the voice of an Apache ShardingSphere community maintainer.

apache/shardingsphere · 50 tokens

fix-ci

Check CI status, analyze test failures, auto-fix obvious issues or discuss with user.

questdb/questdb · 20 tokens