一键导入
bench
Run moon benchmarks. Args: micro|production|resources|profile|all (default: micro). Optional: --shards N, --duration SEC, --scenario NAME.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run moon benchmarks. Args: micro|production|resources|profile|all (default: micro). Optional: --shards N, --duration SEC, --scenario NAME.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
ADD (AI-Driven Development) — a minimal, state-tracked workflow for building software where the AI writes the code and the human owns direction and verification. Drives every feature through one lean TASK.md: Specify → Scenarios → Contract → Tests → Build → Verify → Observe, with red/green TDD built in. Use this skill whenever working in a repo that has a `.add/` directory, when the user says "add", "start a task", "next phase", "specify this feature", "ADD method", or "AI-driven development", or when scaffolding a new feature and you want spec/tests-first discipline instead of vague-prompt coding. Also use it to resume work across sessions (it reads `.add/state.json` so you never re-read the whole repo).
Scaffold a new Redis command implementation with dispatch entry, handler, ACL, tests, and consistency test entry. Args: COMMAND_NAME [category].
Scan hot-path code for allocation violations, lock misuse, and performance anti-patterns. Zero-tolerance audit.
Scaffold a new CUDA kernel with Rust integration via cudarc. Args: kernel_name [f32|f16]. Creates .cu kernel, Rust wrapper, CPU fallback, and benchmark.
Verify code compiles and tests pass under both runtime-tokio and runtime-monoio feature sets. Run before committing runtime-adjacent changes.
Benchmark GPU-accelerated operations (vector distance, batch computation) against CPU baselines. Requires CUDA toolkit. Args: vector|distance|batch|all.
| name | bench |
| description | Run moon benchmarks. Args: micro|production|resources|profile|all (default: micro). Optional: --shards N, --duration SEC, --scenario NAME. |
Run the specified benchmark for moon.
Parse the user's args to determine which benchmark to run:
micro (default) — Criterion micro-benchmarks: cargo benchproduction — Full production workload vs Redis: ./scripts/bench-production.shresources — Memory/resource benchmark: ./scripts/bench-resources.shprofile — CPU + memory profiling suite: ./scripts/profile.shall — Run all of the above sequentiallyPass through any extra flags (e.g. --shards 4, --duration 60, --scenario session-store) to the appropriate script.
Check that the release binary exists at ./target/release/moon. If not, build first:
cargo build --release --no-default-features --features runtime-tokio
Run the selected benchmark:
micro:
RUSTFLAGS="-C target-cpu=native" cargo bench
production:
./scripts/bench-production.sh [extra args]
resources:
./scripts/bench-resources.sh [extra args]
profile:
./scripts/profile.sh [extra args]
Summarize results. For production/resources, the script writes a Markdown report — show the key throughput table and ratios.
--shards 1 and -c 8 to -c 16 parallelismredis-benchmark 8.x (required for \r response parsing)-r flag for unique keys to avoid hot-path cache effects--shards 1