Commit 5c113d0
committed
feat(adapter): add p_by_resourceId gauge projection; refresh legacy-gauge test fixture
Accelerates the gauge "top consumers by resource" panel that the
console queries via dimensions=['resourceId']. resourceId is high-
cardinality (one per file / function / bucket) but gauges are sparse
(one snapshot per resource per interval, not per request), so the
projection stays small relative to events. Same argMaxState(value,
time) aggregator as the existing gauge projections.
The legacy-gauge schema fixture in ClickHouseSchemaTest predates this
projection slate and omitted the resourceId / teamId columns that
v0.3.0 already declared. Updated it to match the 0.3.0 schema so
setup() can attach the new projection during the upgrade test.
Considered an analogous events-side `p_by_endpoint(method, status,
path)` projection for the console TopRequests panel (dimensions=
['path','method','status']). Path is high-cardinality so the
projection's row count would approximately equal the raw events
table — adding ~30% storage for a column-IO win of ~3-5x rather
than the 20-50x the other projections deliver. Deferred in favour
of having the console switch to single-dim ['path'] queries against
the existing p_by_path projection.1 parent 958596b commit 5c113d0
2 files changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1050 | 1050 | | |
1051 | 1051 | | |
1052 | 1052 | | |
| 1053 | + | |
1053 | 1054 | | |
1054 | 1055 | | |
1055 | 1056 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| |||
0 commit comments