Skip to content

donaldfilimon/abi / .agents/skills/wdbx-bench

wdbx-bench

Verified

Build the abi CLI and benchmark the WDBX vector store (in-process insert/search timing), optionally running the abi-wdbx unit-test suite. Use when asked to benchmark WDBX, measure insert/search latency, profile the vector store, or check benchmark output after a storage change.

FileKindSize
SKILL.mdskill md3.2 KB
bench.shexecutablescript1.8 KB
#!/usr/bin/env bash
# wdbx-bench driver: build the abi CLI, run the in-process WDBX benchmark, and
# (optionally) the abi-wdbx unit-test suite. Asserts exit codes and the
# expected output markers. Resolves the repo root from its own location.
#
# Usage:
#   .agents/skills/wdbx-bench/bench.sh [count]     # default count=50
#   .agents/skills/wdbx-bench/bench.sh --suite     # also run `./tools/cargo.sh test -p abi-wdbx --lib < /dev/null`
set -uo pipefail

SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
REPO_ROOT=$(cd -- "$SCRIPT_DIR/../../.." && pwd)
cd "$REPO_ROOT"

SUITE=0
COUNT=50
for a in "$@"; do
    case "$a" in
        --suite) SUITE=1 ;;
        ''|*[!0-9]*) echo "usage: bench.sh [count] [--suite]" >&2; exit 2 ;;
        *) COUNT="$a" ;;
    esac
done

ABI="$REPO_ROOT/target/debug/abi"
fail=0
say() { printf '\n=== %s ===\n' "$*"; }

say "build cli"
if ./tools/cargo.sh build -p abi-cli; then echo "[ok] build"; else echo "[FAIL] build"; exit 1; fi
[ -x "$ABI" ] || { echo "[FAIL] $ABI not produced"; exit 1; }

say "abi wdbx benchmark $COUNT"
out=$("$ABI" wdbx benchmark "$COUNT" 2>&1); rc=$?
printf '%s\n' "$out"
if [ "$rc" -ne 0 ]; then echo "[FAIL] benchmark exit $rc"; fail=$((fail+1)); fi
for marker in "benchmark (local, in-memory" "inserts:" "searches:"; do
    grep -qF -- "$marker" <<<"$out" && echo "[ok] marker: $marker" \
        || { echo "[FAIL] missing marker: $marker"; fail=$((fail+1)); }
done

if [ "$SUITE" -eq 1 ]; then
    say "./tools/cargo.sh test -p abi-wdbx --lib"
    if ./tools/cargo.sh test -p abi-wdbx --lib < /dev/null; then echo "[ok] suite"; else echo "[FAIL] suite"; fail=$((fail+1)); fi
fi

say "summary"
echo "failed checks: $fail"
[ "$fail" -eq 0 ] && echo "RESULT: PASS — WDBX benchmark ran." || echo "RESULT: FAIL — $fail check(s) failed."
exit "$fail"
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall