Commit e60d10b
Document the aggregation semantics of the built-in autoscaling metrics
Review flagged that AutoscalingContext advertised total_queued_requests as
"Number of requests currently queued" while _get_queued_requests now aggregates
the merged handle timeseries with the deployment's aggregation_function, so min
or max reports the window trough or peak instead of the current depth.
Fix the docs rather than the aggregation. total_running_requests is
total_num_requests - total_queued_requests, and the note above it already flags
that non-additive functions make the difference approximate; that identity only
holds while both sides share the function. Aggregating queued with mean while the
total uses max would yield max_total - mean_queued, which approximates nothing
and can go negative.
So: state the shared window and function on the class, where it reaches the
rendered API page; drop "currently" from the field comments; name the coupling at
the subtraction so the two sides do not get aggregated differently by accident;
and stop _get_queued_requests describing itself as a sum, which it never was.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: John Taylor <john.taylor@anyscale.com>1 parent 00cd3f3 commit e60d10b
2 files changed
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
655 | | - | |
| 655 | + | |
| 656 | + | |
656 | 657 | | |
657 | 658 | | |
658 | 659 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
115 | | - | |
| 119 | + | |
116 | 120 | | |
117 | 121 | | |
118 | | - | |
| 122 | + | |
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
| |||
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
175 | | - | |
176 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
177 | 182 | | |
178 | 183 | | |
179 | 184 | | |
| |||
0 commit comments