Skip to content

Detection benchmark

Karakuri ships a reproducible benchmark that measures how well and how fast its native watchers catch common Kubernetes pod failures — with no Prometheus and no LLM key. Run it yourself; the scorecard is deterministic.

Run it

Requires docker, kind, and kubectl:

make bench        # kind cluster + fixture suite + in-cluster runner → scorecard
make bench-down   # tear it down

It deploys a fixture suite (one workload per failure mode), runs python -m src.bench as an in-cluster Job, and prints a scorecard like:

## Karakuri detection benchmark

**Coverage:** 3/3 (100%)  ·  **Median time-to-detect:** 12.4s

| Failure mode | Detected | Time-to-detect |
|---|:---:|---:|
| CrashLoopBackOff (exits non-zero) | ✅ | 9.1s |
| OOMKilled (exceeds memory limit) | ✅ | 14.7s |
| ImagePullBackOff (bad tag) | ✅ | 12.4s |

What it covers

Fixture Failure mode What it proves
crashloop CrashLoopBackOff (exits non-zero) restart detection + threshold
oom OOMKilled (exceeds memory limit) termination-reason classification
badimage ImagePullBackOff (bad tag) waiting-state failure detection

Time-to-detect includes Kubernetes' own backoff before a pod reaches its terminal state, so it is a realistic end-to-end figure, not just Karakuri's overhead.

Scope and honesty

  • This measures detection, not remediation. The closed apply → verify loop is exercised by the integration tests, not this benchmark.
  • The suite is intentionally small and CI-friendly. It is a floor, not a ceiling — Karakuri also detects Service / PVC / Ingress / Node / HPA / rollout / pod-condition issues (see what it detects).
  • Numbers vary with cluster speed and image-pull time. Publish the median from a few runs, and note your environment.

Reviewed: 2026-06-27.