• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubernetes-sigs / inference-perf / 40454232664
87%

Build:
DEFAULT BRANCH: main
Ran 27 Oct 2026 05:24AM UTC
Jobs 1
Files 137
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Oct 2026 05:14AM UTC coverage: 85.112% (+0.4%) from 84.754%
40454232664

push

github

web-flow
Add PromQL-style measured terms to expressions (#919)

Part of #449

Old behaviour: a `Predicate` reads `t` only, so it compiles to the exact
time it starts holding. New behaviour: a `Predicate` can also read
windowed aggregates of finished requests, written in PromQL's range
syntax, plus two window functions PromQL has no spelling for. The time
part is still proved at config load, so a measured term can only make a
condition hold sooner.

```
(t >= 600) | (quantile_over_time(0.99, ttft[30s]) > 2)
(t >= 900) | (avg_over_time(latency[10s]) > 1.5*avg_over_time(latency[10s] offset 10s))
(t >= 900) | (avg_over_last(ttft, 20) > 2*avg_over_sent(ttft, 10, 30))
(t >= 600) | ((in_flight > 0) & (since_last_completion > 30))
```

Terms are evaluated in-process from the same per-request values the
report uses, so a quantile is the exact quantile, not a histogram
estimate. Series use short names (`ttft`, not `time_to_first_token`).
The series table in docs/expressions.md is checked against the code in
both directions. There is no inter-token latency series: the report
re-derives token timestamps from the raw chunks at report time (#564),
so a live ITL would be a different number under the same name. The
runtime metrics leave it out for the same reason.

This PR is the grammar and the evaluators only. Nothing reads a measured
term yet. The first consumer is #823's stop condition, which rebases
onto this and wires `MeasuredState` into the load generator.

Changes:
* `measured.py`: parser for `<agg>_over_time(series[range] offset d @
s)`, `<agg>_over_last(series, n)` and `<agg>_over_sent(series, a, b)`.
Aggregates are avg, min, max, sum, count, stddev and quantile.
* `Predicate` lifts each term out before SymPy parses the rest.
`boundary` is proved with every measured comparison false and `earliest`
with every one true. A condition that cannot hold on time alone is
rejected.
* `MeasuredState(terms, signals)` feeds finished requests to every term
and reports each symb... (continued)

391 of 396 new or added lines in 2 files covered. (98.74%)

12926 of 15187 relevant lines covered (85.11%)

0.85 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
90.43
0.57% inference_perf/utils/numeric/expression/expression.py
Jobs
ID Job ID Ran Files Coverage
1 40454232664.1 27 Oct 2026 05:24AM UTC 137
85.11
GitHub Action Run
Source Files on build 40454232664
  • Tree
  • List 137
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40454232664
  • f24a0953 on github
  • Prev Build on main (#40409384465)
  • Next Build on main (#40542071612)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc