Flag Performance Regressions in Nightly Benchmark Runs With SQL

Last updated: November 29, 2026

Quick Overview

Given a table of nightly benchmark results per benchmark, platform and commit, write a query that flags runs whose score dropped more than 3% below the average of the previous seven runs on the same benchmark and platform.

Arm
Data Manipulation (SQL/Python)
Data Engineer
Arm
November 29, 2026
Data Engineer
Technical Screen
Data Manipulation (SQL/Python)
Medium

0

0

0 solved


Given a table of nightly benchmark results per benchmark, platform and commit, write a query that flags runs whose score dropped more than 3% below the average of the previous seven runs on the same benchmark and platform.

Arm runs large benchmark farms across Cortex and Neoverse models, FVPs and silicon to catch compiler and library performance regressions before release. The interviewer checks window function fluency and whether you think about noisy baselines and insufficient history.

What the Interviewer Expects
  • Partition by benchmark and platform and order by run date
  • Use a frame that excludes the current row
  • Require a minimum number of prior runs before flagging
  • Express the drop as a percentage for triage
  • Discuss noise: mean versus median and outlier contamination
Key Topics to Cover
window functions
rolling baselines
regression detection
SQL
benchmarking
How to Approach This
  1. Clarify the schema and expected output format before writing queries.
  2. Use CTEs (WITH clauses) to break complex queries into readable steps.
  3. Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
  4. Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
  5. For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
  • How would you attribute a flagged regression to a specific commit range?
  • Why might a median or trimmed baseline be better here, and how would you compute it?
  • Some benchmarks are lower-is-better (latency); how do you handle both directions?
  • How would you avoid alerting every night once a regression lands?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice SQL Problems
Sample Answer
Clarify the Data

Table bench_runs(run_date, benchmark, platform, score, commit_sha), one row per benchmark, platform and night, higher score is better. Assume at most one run per key per night; if there are repeats,...

Approach

Compute, for each row, the average and count of the previous seven rows in the same partition using ROWS BETWEEN 7 PRECEDING AND 1 PRECEDING, so the current run never pollutes its own baseline. Then...


Submit Your Answer
Markdown supported

Related Questions