Repository navigation
Commit 6d3af52
feat(asap-tools): label query sets and skew fits for cluster traces (#746)
* feat(asap-tools): add trace label and value skew analysis
Add asap-tools/dataset-analysis: query sets over Google 2011, Alibaba
v2022 and BOOM traces, a fetch script, and fit_skew.py, which fits a
discrete Zipf theta per key query and a power-law alpha per value query,
with lower/upper bounds from per-window fits. Add a CI job running its
lint, type check and unit tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(asap-tools): add skew summary for the fetched traces
Output of fit_skew.py over the data fetched by fetch_data.sh.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(asap-tools): sweep skew window lengths and refine value-alpha fits
- lower/upper now span the per-window fits and the pooled fit, so
lower <= mle <= upper.
- Bounds are computed at several window lengths (window_lengths_s per
dataset) by merging finest-window aggregates; results gain window_len_s.
- Value fits use up to 100k samples and pick xmin over a 50-quantile grid
(p50..p99.9, at least 100 tail values); losing fits report best_alt.
- BOOM series report ok_frac and alpha over passing variates only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(asap-tools): require power law to beat both alternatives
power_law_ok now needs the power law to significantly beat both the
lognormal and the exponential. Otherwise best_alt names the significantly
better alternative or "inconclusive". BOOM ok_frac uses the same rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(asap-tools): classify value tails instead of a pass/fail flag
Replace power_law_ok and best_alt with tail_class (light, power_law,
lognormal, heavy_inconclusive). BOOM series report the majority class,
ok_frac as the share of non-light variates, and alpha and R/p medians
over the non-light variates.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(asap-tools): add per-window K and row stats to skew summary
K and rows were whole-sample totals repeated on every window length.
Rename them to K_total/rows_total and add K_win_{min,median,max} and
rows_win_{min,median,max} from the existing per-window aggregates
(value queries get rows_win_* only), so the saturation study can read N
and K at the sketch window and the query lookback. Write the summary
with enough digits to keep row counts exact.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(asap-tools): extend skew analysis to longer lookback windows
Fetch and analyze a longer sample: Google task_usage/task_events parts
0-119 (about 7 days), Alibaba CallGraph/MCRRTUpdate shards 0-119 (6 h),
MSMetricsUpdate 0-47 and NodeMetricsUpdate 0-1 (1 day). Drop the
30-minute clip on Alibaba tables and let a table override the dataset's
window_lengths_s, so window lengths reach 6 h (CallGraph, MSRTMCR), 1 day
(MSMetrics, NodeMetrics) and 7 days (Google). Joins are loaded once per
table instead of once per file, so the task_events join covers all 120
parts. Regenerate results/skew_summary.csv.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(asap-tools): evaluate skew queries per step as instant and range queries
Replace disjoint window lengths with Prometheus-style evaluation: every
query is evaluated at each step of its table (step_s, the sampling
period), in an instant form (latest sample per series, 5-minute
lookback) and/or range forms (sliding window over the last S seconds).
lower/upper are the min/max over evaluation times; mle pools all data.
- Tables declare step_s and series_key; queries declare promql,
promql_range and range (instant, 5m, 1h; CallGraph events: 1m, 5m, 1h).
Google task_usage is stamped at end_time with a 5-minute step.
- Range key sums use a banded sparse matrix over per-step key
aggregates; value queries merge per-step uniform samples.
- Instant aggregates are computed per file, with series boundary
samples resolved across files; interleaved files fail loudly.
- Add worst-case columns for the sketch-bench study (worst_theta_cms,
worst_K, min_N, max_N, worst_alpha_rank, worst_alpha_memory) and
per-query accuracy targets; cms_weight picks the counter-sketch weight.
- Evaluations with no rows (trace gaps) are skipped for key and value
queries alike.
- Regenerate results/skew_summary.csv.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(asap-tools): add skew analysis figures
Rank-frequency and CCDF plots for every query and range from the current
results, with a short guide to the file names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent a8f57aa commit 6d3af52
144 files changed
Lines changed: 2715 additions & 0 deletions
File tree
- .github/workflows
- asap-tools/dataset-analysis
- figures
- queries
- results
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| 61 | + | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
140 | 174 | | |
141 | 175 | | |
142 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
0 commit comments