ab-test-zephyr

Runs control/treatment Zephyr benchmarks and compares Finelog stage metrics for CPU, elapsed time, and memory.

3.2k|266|Updated Mar 22, 2024
One-click install
npx skills add https://github.com/marin-community/marin --skill ab-test-zephyr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ab-test-zephyr
Source: https://github.com/marin-community/marin/tree/main/.agents/skills/ab-test-zephyr
Command: npx skills add https://github.com/marin-community/marin --skill ab-test-zephyr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Validating whether a Zephyr code change improves or regresses pipeline performance requires a controlled benchmark, but ad-hoc comparisons often mix mismatched workloads, noisy wall-clock readings, and incomplete metrics. This Skill standardizes the entire A/B workflow so performance verdicts on PRs are reproducible and defensible.

Core Features & Use Cases

  • Controlled benchmark launches: Creates git worktrees for the merge-base control and PR-head treatment, then launches matched Iris jobs on GCP or CoreWeave against an immutable pre-normalized sample.
  • Finelog metric comparison: Collects execution IDs from job logs and queries the zephyr.stage namespace to compare CPU time, elapsed time, items, bytes, and peak memory per stage with provided SQL.
  • Comparability validation and reporting: Verifies workload fingerprints, item/byte parity, OOMs, and infrastructure churn before publishing a sentinel-marked verdict comment (pass, regression, tradeoff, or inconclusive) on the PR.
  • Use Case: A reviewer asks whether a shuffle-stage change speeds up dedup. You run this Skill to benchmark the merge base against the PR head on the 100B sample, compare per-stage CPU and elapsed deltas, and post a verdict comment on the PR.

Quick Start

Ask the agent to A/B test the current PR's Zephyr changes against the merge base using the default europe-west4 sample and report the Finelog stage metric comparison.

Frequently Asked Questions about ab-test-zephyr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I A/B test a Zephyr performance change on a pull request?

Create git worktrees at the merge base (control) and PR head (treatment), then launch matched zephyr_benchmark Iris jobs against the same immutable sample with identical pool shapes. Compare per-stage CPU time, elapsed time, and memory from Finelog before posting a verdict.

What metrics should I use to compare Zephyr benchmark runs?

Use cpu_time_total as the primary efficiency signal since it excludes scheduling noise, and treat elapsed as a secondary latency signal sensitive to stragglers. Verify items and bytes_processed match to confirm workload equivalence, and watch mem_peak_bytes_max for OOM regressions.

How do I query Finelog for Zephyr stage metrics?

Collect execution IDs from Iris job logs, then run a Finelog query against the zephyr.stage namespace filtering by those IDs and status END. Aggregate CPU, elapsed, items, and bytes per arm and join control to treatment by stage_name to compute deltas.

Can I reuse an existing baseline run for a Zephyr A/B comparison?

Yes, but only if the baseline report contains the same workload fingerprint (sample, stage range, sources, pool shape, cluster) and its Finelog execution IDs remain queryable. Otherwise launch a fresh matching control to keep the comparison valid.

When should I skip running a remote Zephyr benchmark?

Skip the remote benchmark with reviewer agreement when the change only touches documentation, tests, types, or log text. For code changes, run local Zephyr and Datakit tests first before paying for remote workers.

Why is my Zephyr A/B comparison inconclusive?

Comparisons are inconclusive when workload fingerprints differ, a stage fails, item or byte counts mismatch, or infrastructure churn like preemptions and stragglers distorts elapsed time. Re-run under matched conditions, interleaving control trials if the verdict depends on wall time.