Skip to content
Skills Library
DevOps & cloud · Testing

run-macro-benchmarks

/run-macro-benchmarks

Run a RediSearch end-to-end macro benchmark from tests/benchmarks/*.yml via redisbench-admin. Use this when you want to measure whole-module performance (throughput/latency) against a real redis-server, not micro Rust or C++ benchmarks.

Repository
RediSearch ↗
Licence
AGPL-3.0
Last repository change
27.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.

What it does and when to use it

Run a RediSearch end-to-end macro benchmark from tests/benchmarks/*.yml via redisbench-admin. Use this when you want to measure whole-module performance (throughput/latency) against a real redis-server, not micro Rust or C++ benchmarks.

Original author description

Run a RediSearch end-to-end macro benchmark from tests/benchmarks/*.yml via redisbench-admin. Use this when you want to measure whole-module performance (throughput/latency) against a real redis-server, not micro Rust or C++ benchmarks.

How it works

  1. Arguments
  2. Prerequisites
  3. Instructions
Original SKILL.md headings · 99 lines, 651 words
SKILL.md preview
---
name: run-macro-benchmarks
description: Run a RediSearch end-to-end macro benchmark from tests/benchmarks/*.yml via redisbench-admin. Use this when you want to measure whole-module performance (throughput/latency) against a real redis-server, not micro Rust or C++ benchmarks.
---

# Run Macro Benchmark Skill

Run a RediSearch end-to-end macro benchmark (a `tests/benchmarks/*.yml` config) against
a real `redis-server` using `redisbench-admin run-local`.

For Rust micro-benchmarks (Criterion), use `/run-rust-benchmarks` instead.

## Arguments
- No arguments: List the available benchmarks in `tests/benchmarks/` and ask which to run.
- `<benchmark>`: Run the given benchmark. Accepts the bare name
  (e.g. `search-expire-doc-json-10-milliseconds`), the file name with extension
  (e.g. `search-expire-doc-json-10-milliseconds.yml`), or the full path
  (e.g. `tests/benchmarks/search-expire-doc-json-10-milliseconds.yml`).

Arguments provided: `$ARGUMENTS`

## Prerequisites

Confirm these before running (do not re-install if already present):

1. **The modules are built.** There must be a *release* `redisearch.so` and a *release*
   `rejson.so` under `bin/`. Filter to the `*-release/*` build flavor — a workspace can also
   hold a `linux-x64-debug` (DEBUG=1) or coverage build, and benchmarking the wrong binary
   silently reports numbers for it:
   ```bash
   find "$(pwd)/bin" -name redisearch.so -path '*-release/*'
   find "$(pwd)/bin" -name rejson.so -path '*-release/*'
   ```
   Each must resolve to exactly one path. If either yields more than one candidate, stop and
   ask the user which build to benchmark rather than guessing (the run command below aborts
   on ambiguity). If `redisearch.so` is missing, build with `./build.sh` (or invoke `/build`). If
   `rejson.so` is missing, build it with `./tests/deps/setup_rejson.sh`. RedisJSON is always
   loaded (like CI) so JSON benchmarks work; without it their dataset load fails with
   `unknown command 'JSON.SET'` and the run aborts on a keyspace check.
2. **`redis-server`, `memtier_benchmark`, and `ftsb_redisearch` are on `$PATH`** — some
   benchmarks need `memtier_benchmark` and/or `ftsb_redisearch`. See `developer.md`.
3. **Python benchmark deps are installed** into the project virtualenv:
   ```bash
   uv pip install -r ./tests/benchmarks/requirements.txt
   ```
4. **Port 6379 is free.** `run-local` starts its own `redis-server` on 6379. If another
   `redis-server` is already listening there, redisbench-admin's server fails to bind
   (`Address already in use`) and aborts, but the benchmark then **silently loads into the
   stale server** — which usually lacks the right modules — and fails a keyspace check with
   `0 != <expected>` keys. Check first:
   ```bash
   ss -ltn | grep -q ':6379 ' && echo "PORT 6379 BUSY" || echo "port 6379 free"
   ```
   If busy, do NOT kill it yourself — it may be a workload the user cares about. Report it
   and ask the user to stop it (e.g. `redis-cli -p 6379 shutdown nosave`, or by typing
   `! redis-cli -p 6379 shutdown nosave` in the prompt).

## Instructions

1. Resolve the benchmark argument to a `tests/benchmarks/<benchmark>.yml` path. If no
   argument was given, list `tests/benchmarks/*.yml` and ask the user which to run.
2. Run the benchmark with he following commands. Capture output to a log per the
   "Running Expensive Commands" guidance in `AGENTS.md`:
   ```bash
   set -o pipefail

   # Resolve exactly one *release* module; refuse to guess (a debug/coverage build
   # under bin/ would otherwise be benchmarked and mislabelled as release numbers).
   resolve_release_module() {
       local name=$1 matches n
       matches=$(find "$(pwd)/bin" -name "$name" -path '*-release/*')
       n=$(printf '%s' "$matches" | grep -c .)
       if [ "$n" -ne 1 ]; then
           echo "ERROR: expected exactly one release $name under bin/, found $n:" >&2
           printf '  %s\n' $matches >&2
           return 1
       fi
       printf '%s\n' "$matches"
   }
   REDISEARCH_SO=$(resolve_release_module redisearch.so) || exit 1
   REJSON_SO=$(resolve_release_module rejson.so) || exit 1

   LOG=$(mktemp /tmp/macrobench.XXXXXX.log)
   echo "Log: $LOG"
   uv run redisbench-admin run-local \
       --module_path "$REDISEARCH_SO" \
       --required-module search \
       --module_path "$REJSON_SO" \
       --required-module ReJSON \
       --allowed-setups oss-standalone \
       --allowed-envs oss-standalone \
       --test tests/benchmarks/<benchmark>.yml \
       2>&1 | tee "$LOG" | tail -40
   ```
3. **Run the benchmark only once.** If the output is truncated or you need a specific
   number, `grep`/`rg` the saved `$LOG` — do not re-run the benchmark to see more output.
4. Do NOT run the benchmark concurrently with any `./build.sh`, `make`, or `cargo`
   command — they contend on the shared Cargo build directory and running redis instances,
   and concurrency skews benchmark timings.
5. When the run completes, summarize the key results (throughput ops/sec, latency
   percentiles) from the output. If the user is comparing against another build, ask
   whether they want a copyable markdown table for a PR description.

Versions

The database has no other skills named run-macro-benchmarks.

Database snapshot: 13.11.2026 · package version f5eede749933 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100drive-redisearch
    Drive the locally built RediSearch module the way a user does — a real redis-server with redisearch.so loaded (standalone or a 3-shard OSS cluster), exercised through FT.* commands in redis-cli — and capture evidence. Use to prove a change to indexing, querying, aggregation,…
  • 100worker-benchmarks
    Run comprehensive worker-system benchmarks and performance analysis. Use when benchmarking worker throughput/latency, comparing worker configurations, or diagnosing worker performance.
  • 100run-rust-benchmarks
    Run Rust benchmarks and compare performance with the C implementation. Use this when you work on migrating C code to Rust and want to ensure performance is not regressed.
  • 100system-benchmark
    Measure system throughput, stability, scalability, and resilience. Use when: Run system benchmark, Test scalability, Measure throughput, Check system stability, Run load test.
  • 100run-jmh-benchmarks-hetzner
    Provision a Hetzner CCX33 server, deploy the project, run JMH benchmarks, collect results, and destroy the server. Use ONLY when the user explicitly asks to run JMH benchmarks on a Hetzner server. Do NOT trigger for general benchmark requests or local benchmark runs.
  • 100run-benchmarks
    Run performance benchmarks to measure the impact of code changes. Discovers relevant benchmark scenarios based on changed files, executes them comparing a baseline version against local changes, and summarizes performance results. Use this when touching performance-sensitive…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.