@connectci/xdmod-charts 0.0.0-stage → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +6 -2
- package/dist/caption.d.ts +68 -0
- package/dist/caption.js +118 -0
- package/dist/csv.d.ts +22 -0
- package/dist/csv.js +95 -0
- package/dist/fixtures.d.ts +58 -0
- package/dist/fixtures.js +1 -0
- package/dist/format.d.ts +6 -0
- package/dist/format.js +39 -0
- package/dist/generated/palette.d.ts +4 -0
- package/dist/generated/palette.js +23 -0
- package/dist/generated/statistics.d.ts +6 -0
- package/dist/generated/statistics.js +217 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +8 -0
- package/dist/measure.d.ts +7 -0
- package/dist/measure.js +14 -0
- package/dist/palette.d.ts +11 -0
- package/dist/palette.js +19 -0
- package/dist/parse.d.ts +3 -0
- package/dist/parse.js +82 -0
- package/dist/payload.d.ts +81 -0
- package/dist/payload.js +1 -0
- package/dist/view.d.ts +58 -0
- package/dist/view.js +243 -0
- package/fixtures/README.md +13 -0
- package/fixtures/aggregate-empty.json +85 -0
- package/fixtures/aggregate-fills-empty-buckets.json +118 -0
- package/fixtures/aggregate-has-more-others-count.json +103 -0
- package/fixtures/aggregate-incomplete-with-probe-day.json +108 -0
- package/fixtures/aggregate-jobs-by-resource.json +66 -0
- package/fixtures/aggregate-marks-resources-that-stop.json +125 -0
- package/fixtures/aggregate-no-fill-for-average.json +115 -0
- package/fixtures/aggregate-no-fill-incomplete-buckets.json +110 -0
- package/fixtures/aggregate-no-fill-when-bucket-filtered.json +114 -0
- package/fixtures/aggregate-no-fill-when-more.json +110 -0
- package/fixtures/aggregate-no-fill-with-offset.json +110 -0
- package/fixtures/aggregate-nominal-not-reordered.json +107 -0
- package/fixtures/aggregate-offset-page.json +103 -0
- package/fixtures/aggregate-ordered-bucket-order.json +116 -0
- package/fixtures/aggregate-probe-reaches-end.json +108 -0
- package/fixtures/aggregate-unknown-bucket-last.json +115 -0
- package/fixtures/aggregate-unordered.json +103 -0
- package/fixtures/average-leaves-gaps.json +125 -0
- package/fixtures/calendar-december-into-january.json +113 -0
- package/fixtures/calendar-range-ends-at-month-end.json +108 -0
- package/fixtures/cpu-hours-by-resource-incomplete.json +125 -0
- package/fixtures/early-end-average-by-resource-not-filled.json +147 -0
- package/fixtures/early-end-average-other-dimension.json +144 -0
- package/fixtures/early-end-daily-by-queue.json +180 -0
- package/fixtures/early-end-daily-series-stops.json +139 -0
- package/fixtures/early-end-day-inside-last-period.json +147 -0
- package/fixtures/early-end-fill-stops-at-last-day.json +145 -0
- package/fixtures/early-end-fills-to-resource-last-day.json +149 -0
- package/fixtures/early-end-other-dimension-never-filled.json +145 -0
- package/fixtures/early-end-probe-window-too-short.json +144 -0
- package/fixtures/early-end-resource-retired.json +144 -0
- package/fixtures/early-end-several-resources.json +205 -0
- package/fixtures/early-end-without-probe.json +140 -0
- package/fixtures/label-stripped-from-description.json +95 -0
- package/fixtures/no-series-values.json +86 -0
- package/fixtures/partial-last-day.json +119 -0
- package/fixtures/partial-last-month.json +122 -0
- package/fixtures/probe-day-after-range.json +113 -0
- package/fixtures/probe-day-inside-last-month.json +113 -0
- package/fixtures/probe-day-last-day-of-period.json +113 -0
- package/fixtures/rank-prefixes-on-series.json +130 -0
- package/fixtures/series-ended-before-probe-day.json +188 -0
- package/fixtures/timeseries-complete-last-period.json +113 -0
- package/fixtures/timeseries-month-gaps.json +121 -0
- package/fixtures/timeseries-more-series-than-palette.json +328 -0
- package/fixtures/warnings-all-three.json +104 -0
- package/fixtures/week-total-incomplete-last.json +135 -0
- package/fixtures/week-total-midweek-end.json +130 -0
- package/fixtures/week-total-midweek-start.json +129 -0
- package/package.json +32 -4
- package/rules/README.md +29 -0
- package/rules/palette.json +4 -0
- package/rules/statistics.json +217 -0
- package/schema/chart-payload.v1.json +320 -0
package/dist/view.js
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { formatDay } from "./format.js";
|
|
2
|
+
import { MAX_SERIES, PALETTE, colorFor } from "./palette.js";
|
|
3
|
+
/** The warnings used only when the payload has no `warnings` field. */
|
|
4
|
+
export const BUILT_IN_WARNINGS = [
|
|
5
|
+
{
|
|
6
|
+
code: "waiting-not-counted",
|
|
7
|
+
text: "Jobs still waiting aren't counted, and the last few days may be incomplete.",
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
code: "not-comparable-across-resources",
|
|
11
|
+
text: "CPU hours don't allow for each resource's compute power per core, so they aren't comparable across resources. ACE measures are.",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
code: "mean-of-jobs",
|
|
15
|
+
text: "This is an average per job, so a few long jobs can pull it up.",
|
|
16
|
+
},
|
|
17
|
+
];
|
|
18
|
+
const builtIn = (code) => BUILT_IN_WARNINGS.find((w) => w.code === code);
|
|
19
|
+
export function isChartWorthy(chart) {
|
|
20
|
+
if (chart.dataset_type === "aggregate") {
|
|
21
|
+
return (chart.categories?.length ?? 0) > 1;
|
|
22
|
+
}
|
|
23
|
+
let nonNull = 0;
|
|
24
|
+
for (const s of chart.series ?? []) {
|
|
25
|
+
for (const p of s.points)
|
|
26
|
+
if (p.value !== null)
|
|
27
|
+
nonNull++;
|
|
28
|
+
}
|
|
29
|
+
return nonNull > 1;
|
|
30
|
+
}
|
|
31
|
+
export const DIMENSION_LABELS = {
|
|
32
|
+
none: "Name",
|
|
33
|
+
resource: "Resource",
|
|
34
|
+
resource_type: "Resource type",
|
|
35
|
+
fieldofscience: "Field of science",
|
|
36
|
+
parentscience: "Parent science",
|
|
37
|
+
nsfdirectorate: "NSF directorate",
|
|
38
|
+
jobsize: "Job size",
|
|
39
|
+
jobwalltime: "Job wall time",
|
|
40
|
+
jobwaittime: "Job wait time",
|
|
41
|
+
queue: "Queue",
|
|
42
|
+
person: "User",
|
|
43
|
+
username: "User",
|
|
44
|
+
pi: "PI",
|
|
45
|
+
institution: "Institution",
|
|
46
|
+
provider: "Service provider",
|
|
47
|
+
allocation: "Allocation",
|
|
48
|
+
gpucount: "GPU count",
|
|
49
|
+
};
|
|
50
|
+
export const DIMENSION_NOUNS = {
|
|
51
|
+
resource: "resources",
|
|
52
|
+
resource_type: "resource types",
|
|
53
|
+
fieldofscience: "fields of science",
|
|
54
|
+
parentscience: "parent sciences",
|
|
55
|
+
nsfdirectorate: "NSF directorates",
|
|
56
|
+
queue: "queues",
|
|
57
|
+
person: "users",
|
|
58
|
+
username: "users",
|
|
59
|
+
pi: "PIs",
|
|
60
|
+
institution: "institutions",
|
|
61
|
+
provider: "service providers",
|
|
62
|
+
allocation: "allocations",
|
|
63
|
+
};
|
|
64
|
+
/** A readable column name for an XDMoD dimension id. */
|
|
65
|
+
export function dimensionLabel(name) {
|
|
66
|
+
const known = DIMENSION_LABELS[name.toLowerCase()];
|
|
67
|
+
if (known)
|
|
68
|
+
return known;
|
|
69
|
+
return name
|
|
70
|
+
.replace(/([a-z])([A-Z])/g, "$1 $2")
|
|
71
|
+
.split(/[\s_-]+/)
|
|
72
|
+
.filter(Boolean)
|
|
73
|
+
.map((w) => w[0].toUpperCase() + w.slice(1))
|
|
74
|
+
.join(" ");
|
|
75
|
+
}
|
|
76
|
+
const CPU_HOUR_STATISTICS = new Set(["total_cpu_hours", "avg_cpu_hours"]);
|
|
77
|
+
/** The built-in warnings for a payload that has no `warnings` field. */
|
|
78
|
+
function builtInWarningsFor(chart) {
|
|
79
|
+
const warnings = [];
|
|
80
|
+
const { statistic, realm } = chart;
|
|
81
|
+
if (realm.toLowerCase() === "jobs" && chart.last_period_incomplete) {
|
|
82
|
+
warnings.push(builtIn("waiting-not-counted"));
|
|
83
|
+
}
|
|
84
|
+
// XD SUs are normalized and comparable across resources, and ACEs allow
|
|
85
|
+
// comparison between resources with different compute power per core; CPU hours don't.
|
|
86
|
+
if ((chart.group_by === "resource" || chart.dimension.name === "resource") &&
|
|
87
|
+
CPU_HOUR_STATISTICS.has(statistic)) {
|
|
88
|
+
warnings.push(builtIn("not-comparable-across-resources"));
|
|
89
|
+
}
|
|
90
|
+
if (statistic.startsWith("avg_"))
|
|
91
|
+
warnings.push(builtIn("mean-of-jobs"));
|
|
92
|
+
return warnings;
|
|
93
|
+
}
|
|
94
|
+
function earlyEnd(name, through, precision, source) {
|
|
95
|
+
// Without a source, nothing is known about why: say the least.
|
|
96
|
+
return through
|
|
97
|
+
? { name, through, precision: precision ?? "day", source: source ?? "series" }
|
|
98
|
+
: undefined;
|
|
99
|
+
}
|
|
100
|
+
function lastNonNull(points) {
|
|
101
|
+
for (let i = points.length - 1; i >= 0; i--)
|
|
102
|
+
if (points[i].value !== null)
|
|
103
|
+
return i;
|
|
104
|
+
return -1;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* What a screen reader hears for the drawing, in place of its tick labels.
|
|
108
|
+
* The table view holds the values themselves.
|
|
109
|
+
*/
|
|
110
|
+
export function chartSummary(view) {
|
|
111
|
+
const { start, end } = view.caption.counted;
|
|
112
|
+
const range = `${formatDay(start)} to ${formatDay(end)}`;
|
|
113
|
+
const what = view.kind === "line"
|
|
114
|
+
? `Line chart of ${view.title}, ${view.series.length} series`
|
|
115
|
+
: `Bar chart of ${view.title} by ${view.dimension.toLowerCase()}, ${view.bars.length} ${view.bars.length === 1 ? "bar" : "bars"}`;
|
|
116
|
+
return `${what}, ${range}. The Table view lists the values.`;
|
|
117
|
+
}
|
|
118
|
+
export function toView(chart, options = {}) {
|
|
119
|
+
const zero = chart.measure.missing === "zero";
|
|
120
|
+
const fill = (v) => (v === null && zero ? 0 : v);
|
|
121
|
+
// Past the last period XDMoD has data for, missing means unknown, not
|
|
122
|
+
// zero: filling it would draw a drop that didn't happen.
|
|
123
|
+
const through = chart.data_through;
|
|
124
|
+
const fillPoint = (p) => through && p.start.slice(0, 10) > through ? p.value : fill(p.value);
|
|
125
|
+
let kind;
|
|
126
|
+
let series = [];
|
|
127
|
+
let bars = [];
|
|
128
|
+
let arrived;
|
|
129
|
+
let earlyEnds;
|
|
130
|
+
if (chart.dataset_type === "timeseries") {
|
|
131
|
+
kind = "line";
|
|
132
|
+
// A series that stops before the others stops there too: its own last
|
|
133
|
+
// value, not the chart's, ends what can be read as zero.
|
|
134
|
+
const filled = (chart.series ?? []).flatMap((s) => {
|
|
135
|
+
const last = lastNonNull(s.points);
|
|
136
|
+
if (last === -1)
|
|
137
|
+
return [];
|
|
138
|
+
return [
|
|
139
|
+
{
|
|
140
|
+
name: s.name,
|
|
141
|
+
points: s.points.map((p, i) => ({
|
|
142
|
+
start: p.start,
|
|
143
|
+
value: i > last ? p.value : fillPoint(p),
|
|
144
|
+
})),
|
|
145
|
+
end: earlyEnd(s.name, s.data_through, s.data_through_precision, s.data_through_source),
|
|
146
|
+
},
|
|
147
|
+
];
|
|
148
|
+
});
|
|
149
|
+
arrived = filled.length;
|
|
150
|
+
// A trailing period no series has any value for draws nothing, so the
|
|
151
|
+
// axis stops at the last period with data.
|
|
152
|
+
let periodsWithData = 0;
|
|
153
|
+
for (const s of filled)
|
|
154
|
+
periodsWithData = Math.max(periodsWithData, lastNonNull(s.points) + 1);
|
|
155
|
+
for (const s of filled)
|
|
156
|
+
s.points = s.points.slice(0, periodsWithData);
|
|
157
|
+
const drawn = filled.slice(0, MAX_SERIES);
|
|
158
|
+
const names = drawn.map((s) => s.name);
|
|
159
|
+
series = drawn.map(({ name, points }) => ({
|
|
160
|
+
name,
|
|
161
|
+
color: colorFor(name, names, "light"),
|
|
162
|
+
darkColor: colorFor(name, names, "dark"),
|
|
163
|
+
points,
|
|
164
|
+
}));
|
|
165
|
+
earlyEnds = drawn.flatMap((s) => (s.end ? [s.end] : []));
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
// One measure, one colour: every bar takes the first slot.
|
|
169
|
+
const color = PALETTE.light[0];
|
|
170
|
+
const darkColor = PALETTE.dark[0];
|
|
171
|
+
bars = (chart.categories ?? []).map((c) => ({
|
|
172
|
+
name: c.name,
|
|
173
|
+
color,
|
|
174
|
+
darkColor,
|
|
175
|
+
value: fill(c.value),
|
|
176
|
+
}));
|
|
177
|
+
if (chart.dimension.ordered) {
|
|
178
|
+
kind = "bar-ordered";
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
kind = "bar-ranked";
|
|
182
|
+
bars = bars
|
|
183
|
+
.map((b, i) => ({ b, i }))
|
|
184
|
+
.sort((x, y) => {
|
|
185
|
+
if (x.b.value === null || y.b.value === null) {
|
|
186
|
+
return x.b.value === y.b.value ? x.i - y.i : x.b.value === null ? 1 : -1;
|
|
187
|
+
}
|
|
188
|
+
return y.b.value - x.b.value || x.i - y.i;
|
|
189
|
+
})
|
|
190
|
+
.map(({ b }) => b);
|
|
191
|
+
}
|
|
192
|
+
arrived = bars.length;
|
|
193
|
+
earlyEnds = (chart.categories ?? []).flatMap((c) => earlyEnd(c.name, c.data_through, "day", c.data_through_source) ?? []);
|
|
194
|
+
}
|
|
195
|
+
const shown = kind === "line" ? series.length : bars.length;
|
|
196
|
+
const offset = chart.offset ?? 0;
|
|
197
|
+
const others = chart.has_more ? chart.others_count : 0;
|
|
198
|
+
const total = others === null || others === undefined ? undefined : offset + arrived + others;
|
|
199
|
+
const precision = chart.data_through_precision ??
|
|
200
|
+
(chart.dataset_type === "aggregate" || chart.unit === "Day" ? "day" : "period");
|
|
201
|
+
const noDataAfter = !!through &&
|
|
202
|
+
(chart.series ?? []).some((s) => s.points.some((p) => p.start.slice(0, 10) > through));
|
|
203
|
+
const instance = options.instance ?? chart.instance ?? null;
|
|
204
|
+
const zone = chart.time_basis?.zone;
|
|
205
|
+
const zoneNote = zone && options.viewerZone && zone !== options.viewerZone
|
|
206
|
+
? `Days are counted in ${zone} time.`
|
|
207
|
+
: undefined;
|
|
208
|
+
const view = {
|
|
209
|
+
kind,
|
|
210
|
+
title: chart.measure.label,
|
|
211
|
+
dimension: dimensionLabel(chart.dimension.name),
|
|
212
|
+
series,
|
|
213
|
+
bars,
|
|
214
|
+
caption: {
|
|
215
|
+
measure: chart.measure.label,
|
|
216
|
+
definition: chart.measure.description,
|
|
217
|
+
counted: { ...chart.counted },
|
|
218
|
+
...(chart.data_through
|
|
219
|
+
? { dataThrough: chart.data_through, dataThroughPrecision: precision, noDataAfter }
|
|
220
|
+
: {}),
|
|
221
|
+
...(chart.data_through && chart.last_data_period_partial
|
|
222
|
+
? { partialPeriod: chart.data_through }
|
|
223
|
+
: {}),
|
|
224
|
+
unit: chart.unit,
|
|
225
|
+
filters: [...chart.filters.notes],
|
|
226
|
+
...(zoneNote ? { zoneNote } : {}),
|
|
227
|
+
hasMore: chart.has_more || shown < arrived,
|
|
228
|
+
...(total !== undefined ? { total } : {}),
|
|
229
|
+
...(offset > 0 ? { offset } : {}),
|
|
230
|
+
...(earlyEnds.length > 0 ? { earlyEnds } : {}),
|
|
231
|
+
groupNoun: DIMENSION_NOUNS[chart.dimension.name.toLowerCase()] ?? "groups",
|
|
232
|
+
ordered: chart.dimension.ordered,
|
|
233
|
+
incomplete: chart.last_period_incomplete,
|
|
234
|
+
warnings: chart.warnings ? chart.warnings.map((w) => ({ ...w })) : builtInWarningsFor(chart),
|
|
235
|
+
source: instance?.name ?? chart.source,
|
|
236
|
+
retrieved: chart.retrieved,
|
|
237
|
+
},
|
|
238
|
+
// The payload crossed a network boundary: only a web link is followed.
|
|
239
|
+
link: chart.link?.startsWith("https:") ? chart.link : null,
|
|
240
|
+
instance: instance ? { ...instance } : null,
|
|
241
|
+
};
|
|
242
|
+
return { ...view, summary: chartSummary(view) };
|
|
243
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Builder fixtures
|
|
2
|
+
|
|
3
|
+
Each `fixtures/<name>.json` is one case for a producer's payload builder:
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{ "description": "...", "producers": ["ts", "py"], "input": { }, "expected": { } }
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
`input` is a `BuilderInput` (see `src/fixtures.ts`): the request, XDMoD's answers already fetched (series values keyed by period start, or ranked categories), today's date, and the optional probes (`latest_data_day`, `resource_days`). `expected` is the `ChartPayload` the builder must return. `producers` lists which implementations are held to the fixture: `ts` is access-mcp, `py` is xdmod-mcp. `series` and `categories` in the input are post-trim: the producer's adapter, not the builder, drops gap-connector traces, "All N Others" entries and series with no values, applies the limit, and derives `has_more` and `others_count` (as access-mcp's `trimToLimit` does). `request.limit` is informational. A producer runs every fixture that names it.
|
|
10
|
+
|
|
11
|
+
Comparison rule: deep equality between the builder's output and `expected`, except `warnings`. For `warnings` only the ordered list of `code`s is compared. The text is each producer's own.
|
|
12
|
+
|
|
13
|
+
Fixture values are invented, never recorded from a real or demo XDMoD. Usernames, people, projects and queues are always synthetic (`user-1`, `queue-a`). Resources may be synthetic (`cluster-a`) or a public resource's name, since those names are public; their values are still invented. Each rule in `rules/README.md` names the fixtures that pin it.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "An aggregate with no data has no categories.",
|
|
3
|
+
"producers": [
|
|
4
|
+
"ts",
|
|
5
|
+
"py"
|
|
6
|
+
],
|
|
7
|
+
"input": {
|
|
8
|
+
"request": {
|
|
9
|
+
"realm": "Jobs",
|
|
10
|
+
"statistic": "job_count",
|
|
11
|
+
"group_by": "resource",
|
|
12
|
+
"dataset_type": "aggregate",
|
|
13
|
+
"start_date": "2026-08-01",
|
|
14
|
+
"end_date": "2026-11-08",
|
|
15
|
+
"filters_notes": [],
|
|
16
|
+
"dimension_filtered": false,
|
|
17
|
+
"offset": 0,
|
|
18
|
+
"limit": 10,
|
|
19
|
+
"unit": "Month"
|
|
20
|
+
},
|
|
21
|
+
"label": "Number of Jobs Ended",
|
|
22
|
+
"description": "Jobs run",
|
|
23
|
+
"today": "2026-11-09",
|
|
24
|
+
"others_count": 0,
|
|
25
|
+
"has_more": false,
|
|
26
|
+
"latest_data_day": null,
|
|
27
|
+
"resource_days": null,
|
|
28
|
+
"link": "https://xdmod.example/chart",
|
|
29
|
+
"time_zone": "America/New_York",
|
|
30
|
+
"instance": {
|
|
31
|
+
"name": "ACCESS XDMoD",
|
|
32
|
+
"url": "https://xdmod.access-ci.org"
|
|
33
|
+
},
|
|
34
|
+
"categories": []
|
|
35
|
+
},
|
|
36
|
+
"expected": {
|
|
37
|
+
"version": 1,
|
|
38
|
+
"realm": "Jobs",
|
|
39
|
+
"statistic": "job_count",
|
|
40
|
+
"group_by": "resource",
|
|
41
|
+
"dataset_type": "aggregate",
|
|
42
|
+
"requested": {
|
|
43
|
+
"start": "2026-08-01",
|
|
44
|
+
"end": "2026-11-08"
|
|
45
|
+
},
|
|
46
|
+
"counted": {
|
|
47
|
+
"start": "2026-08-01",
|
|
48
|
+
"end": "2026-11-08"
|
|
49
|
+
},
|
|
50
|
+
"last_period_incomplete": false,
|
|
51
|
+
"measure": {
|
|
52
|
+
"label": "Number of Jobs Ended",
|
|
53
|
+
"description": "Jobs run",
|
|
54
|
+
"kind": "total",
|
|
55
|
+
"missing": "zero",
|
|
56
|
+
"unit": "jobs"
|
|
57
|
+
},
|
|
58
|
+
"dimension": {
|
|
59
|
+
"name": "resource",
|
|
60
|
+
"ordered": false
|
|
61
|
+
},
|
|
62
|
+
"filters": {
|
|
63
|
+
"notes": []
|
|
64
|
+
},
|
|
65
|
+
"time_basis": {
|
|
66
|
+
"zone": "America/New_York"
|
|
67
|
+
},
|
|
68
|
+
"instance": {
|
|
69
|
+
"name": "ACCESS XDMoD",
|
|
70
|
+
"url": "https://xdmod.access-ci.org"
|
|
71
|
+
},
|
|
72
|
+
"warnings": [],
|
|
73
|
+
"offset": 0,
|
|
74
|
+
"data_through": null,
|
|
75
|
+
"data_through_precision": null,
|
|
76
|
+
"others_count": 0,
|
|
77
|
+
"last_data_period_partial": false,
|
|
78
|
+
"has_more": false,
|
|
79
|
+
"ranked_by": "value",
|
|
80
|
+
"link": "https://xdmod.example/chart",
|
|
81
|
+
"source": "XDMoD",
|
|
82
|
+
"retrieved": "2026-11-09",
|
|
83
|
+
"categories": []
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Of a count, buckets XDMoD left out are 0 when the bucket list is complete and nothing is filtered or paged.",
|
|
3
|
+
"producers": [
|
|
4
|
+
"ts",
|
|
5
|
+
"py"
|
|
6
|
+
],
|
|
7
|
+
"input": {
|
|
8
|
+
"request": {
|
|
9
|
+
"realm": "Jobs",
|
|
10
|
+
"statistic": "job_count",
|
|
11
|
+
"group_by": "jobsize",
|
|
12
|
+
"dataset_type": "aggregate",
|
|
13
|
+
"start_date": "2026-08-01",
|
|
14
|
+
"end_date": "2026-11-08",
|
|
15
|
+
"filters_notes": [],
|
|
16
|
+
"dimension_filtered": false,
|
|
17
|
+
"offset": 0,
|
|
18
|
+
"limit": 10,
|
|
19
|
+
"unit": "Month"
|
|
20
|
+
},
|
|
21
|
+
"label": "Number of Jobs Ended",
|
|
22
|
+
"description": "Jobs run",
|
|
23
|
+
"today": "2026-11-09",
|
|
24
|
+
"others_count": 0,
|
|
25
|
+
"has_more": false,
|
|
26
|
+
"latest_data_day": null,
|
|
27
|
+
"resource_days": null,
|
|
28
|
+
"link": "https://xdmod.example/chart",
|
|
29
|
+
"time_zone": "America/New_York",
|
|
30
|
+
"instance": {
|
|
31
|
+
"name": "ACCESS XDMoD",
|
|
32
|
+
"url": "https://xdmod.access-ci.org"
|
|
33
|
+
},
|
|
34
|
+
"dimension_order": [
|
|
35
|
+
"1",
|
|
36
|
+
"2 - 4",
|
|
37
|
+
"5 - 8",
|
|
38
|
+
"> 8"
|
|
39
|
+
],
|
|
40
|
+
"dimension_complete": true,
|
|
41
|
+
"categories": [
|
|
42
|
+
{
|
|
43
|
+
"name": "5 - 8",
|
|
44
|
+
"value": 4
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "1",
|
|
48
|
+
"value": 9
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"expected": {
|
|
53
|
+
"version": 1,
|
|
54
|
+
"realm": "Jobs",
|
|
55
|
+
"statistic": "job_count",
|
|
56
|
+
"group_by": "jobsize",
|
|
57
|
+
"dataset_type": "aggregate",
|
|
58
|
+
"requested": {
|
|
59
|
+
"start": "2026-08-01",
|
|
60
|
+
"end": "2026-11-08"
|
|
61
|
+
},
|
|
62
|
+
"counted": {
|
|
63
|
+
"start": "2026-08-01",
|
|
64
|
+
"end": "2026-11-08"
|
|
65
|
+
},
|
|
66
|
+
"last_period_incomplete": false,
|
|
67
|
+
"measure": {
|
|
68
|
+
"label": "Number of Jobs Ended",
|
|
69
|
+
"description": "Jobs run",
|
|
70
|
+
"kind": "total",
|
|
71
|
+
"missing": "zero",
|
|
72
|
+
"unit": "jobs"
|
|
73
|
+
},
|
|
74
|
+
"dimension": {
|
|
75
|
+
"name": "jobsize",
|
|
76
|
+
"ordered": true
|
|
77
|
+
},
|
|
78
|
+
"filters": {
|
|
79
|
+
"notes": []
|
|
80
|
+
},
|
|
81
|
+
"time_basis": {
|
|
82
|
+
"zone": "America/New_York"
|
|
83
|
+
},
|
|
84
|
+
"instance": {
|
|
85
|
+
"name": "ACCESS XDMoD",
|
|
86
|
+
"url": "https://xdmod.access-ci.org"
|
|
87
|
+
},
|
|
88
|
+
"warnings": [],
|
|
89
|
+
"offset": 0,
|
|
90
|
+
"data_through": null,
|
|
91
|
+
"data_through_precision": null,
|
|
92
|
+
"others_count": 0,
|
|
93
|
+
"last_data_period_partial": false,
|
|
94
|
+
"has_more": false,
|
|
95
|
+
"ranked_by": "value",
|
|
96
|
+
"link": "https://xdmod.example/chart",
|
|
97
|
+
"source": "XDMoD",
|
|
98
|
+
"retrieved": "2026-11-09",
|
|
99
|
+
"categories": [
|
|
100
|
+
{
|
|
101
|
+
"name": "1",
|
|
102
|
+
"value": 9
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "2 - 4",
|
|
106
|
+
"value": 0
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "5 - 8",
|
|
110
|
+
"value": 4
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "> 8",
|
|
114
|
+
"value": 0
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Past the limit: has_more is true and others_count is the count XDMoD gave plus what the adapter cut.",
|
|
3
|
+
"producers": [
|
|
4
|
+
"ts",
|
|
5
|
+
"py"
|
|
6
|
+
],
|
|
7
|
+
"input": {
|
|
8
|
+
"request": {
|
|
9
|
+
"realm": "Jobs",
|
|
10
|
+
"statistic": "job_count",
|
|
11
|
+
"group_by": "resource",
|
|
12
|
+
"dataset_type": "aggregate",
|
|
13
|
+
"start_date": "2026-08-01",
|
|
14
|
+
"end_date": "2026-11-08",
|
|
15
|
+
"filters_notes": [],
|
|
16
|
+
"dimension_filtered": false,
|
|
17
|
+
"offset": 0,
|
|
18
|
+
"limit": 2,
|
|
19
|
+
"unit": "Month"
|
|
20
|
+
},
|
|
21
|
+
"label": "Number of Jobs Ended",
|
|
22
|
+
"description": "Jobs run",
|
|
23
|
+
"today": "2026-11-09",
|
|
24
|
+
"others_count": 38,
|
|
25
|
+
"has_more": true,
|
|
26
|
+
"latest_data_day": null,
|
|
27
|
+
"resource_days": null,
|
|
28
|
+
"link": "https://xdmod.example/chart",
|
|
29
|
+
"time_zone": "America/New_York",
|
|
30
|
+
"instance": {
|
|
31
|
+
"name": "ACCESS XDMoD",
|
|
32
|
+
"url": "https://xdmod.access-ci.org"
|
|
33
|
+
},
|
|
34
|
+
"categories": [
|
|
35
|
+
{
|
|
36
|
+
"name": "1. cluster-a",
|
|
37
|
+
"value": 9
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "2. cluster-b",
|
|
41
|
+
"value": 5
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"expected": {
|
|
46
|
+
"version": 1,
|
|
47
|
+
"realm": "Jobs",
|
|
48
|
+
"statistic": "job_count",
|
|
49
|
+
"group_by": "resource",
|
|
50
|
+
"dataset_type": "aggregate",
|
|
51
|
+
"requested": {
|
|
52
|
+
"start": "2026-08-01",
|
|
53
|
+
"end": "2026-11-08"
|
|
54
|
+
},
|
|
55
|
+
"counted": {
|
|
56
|
+
"start": "2026-08-01",
|
|
57
|
+
"end": "2026-11-08"
|
|
58
|
+
},
|
|
59
|
+
"last_period_incomplete": false,
|
|
60
|
+
"measure": {
|
|
61
|
+
"label": "Number of Jobs Ended",
|
|
62
|
+
"description": "Jobs run",
|
|
63
|
+
"kind": "total",
|
|
64
|
+
"missing": "zero",
|
|
65
|
+
"unit": "jobs"
|
|
66
|
+
},
|
|
67
|
+
"dimension": {
|
|
68
|
+
"name": "resource",
|
|
69
|
+
"ordered": false
|
|
70
|
+
},
|
|
71
|
+
"filters": {
|
|
72
|
+
"notes": []
|
|
73
|
+
},
|
|
74
|
+
"time_basis": {
|
|
75
|
+
"zone": "America/New_York"
|
|
76
|
+
},
|
|
77
|
+
"instance": {
|
|
78
|
+
"name": "ACCESS XDMoD",
|
|
79
|
+
"url": "https://xdmod.access-ci.org"
|
|
80
|
+
},
|
|
81
|
+
"warnings": [],
|
|
82
|
+
"offset": 0,
|
|
83
|
+
"data_through": null,
|
|
84
|
+
"data_through_precision": null,
|
|
85
|
+
"others_count": 38,
|
|
86
|
+
"last_data_period_partial": false,
|
|
87
|
+
"has_more": true,
|
|
88
|
+
"ranked_by": "value",
|
|
89
|
+
"link": "https://xdmod.example/chart",
|
|
90
|
+
"source": "XDMoD",
|
|
91
|
+
"retrieved": "2026-11-09",
|
|
92
|
+
"categories": [
|
|
93
|
+
{
|
|
94
|
+
"name": "cluster-a",
|
|
95
|
+
"value": 9
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "cluster-b",
|
|
99
|
+
"value": 5
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "The range reaches today and the realm's data stops before it: data_through is the latest data day.",
|
|
3
|
+
"producers": [
|
|
4
|
+
"ts",
|
|
5
|
+
"py"
|
|
6
|
+
],
|
|
7
|
+
"input": {
|
|
8
|
+
"request": {
|
|
9
|
+
"realm": "Jobs",
|
|
10
|
+
"statistic": "job_count",
|
|
11
|
+
"group_by": "resource",
|
|
12
|
+
"dataset_type": "aggregate",
|
|
13
|
+
"start_date": "2026-01-01",
|
|
14
|
+
"end_date": "2026-11-09",
|
|
15
|
+
"filters_notes": [],
|
|
16
|
+
"dimension_filtered": false,
|
|
17
|
+
"offset": 0,
|
|
18
|
+
"limit": 10,
|
|
19
|
+
"unit": "Month"
|
|
20
|
+
},
|
|
21
|
+
"label": "Number of Jobs Ended",
|
|
22
|
+
"description": "Jobs run",
|
|
23
|
+
"today": "2026-11-09",
|
|
24
|
+
"others_count": 0,
|
|
25
|
+
"has_more": false,
|
|
26
|
+
"latest_data_day": "2026-10-01",
|
|
27
|
+
"resource_days": null,
|
|
28
|
+
"link": "https://xdmod.example/chart",
|
|
29
|
+
"time_zone": "America/New_York",
|
|
30
|
+
"instance": {
|
|
31
|
+
"name": "ACCESS XDMoD",
|
|
32
|
+
"url": "https://xdmod.access-ci.org"
|
|
33
|
+
},
|
|
34
|
+
"categories": [
|
|
35
|
+
{
|
|
36
|
+
"name": "cluster-a",
|
|
37
|
+
"value": 2
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "cluster-b",
|
|
41
|
+
"value": 1
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"expected": {
|
|
46
|
+
"version": 1,
|
|
47
|
+
"realm": "Jobs",
|
|
48
|
+
"statistic": "job_count",
|
|
49
|
+
"group_by": "resource",
|
|
50
|
+
"dataset_type": "aggregate",
|
|
51
|
+
"requested": {
|
|
52
|
+
"start": "2026-01-01",
|
|
53
|
+
"end": "2026-11-09"
|
|
54
|
+
},
|
|
55
|
+
"counted": {
|
|
56
|
+
"start": "2026-01-01",
|
|
57
|
+
"end": "2026-11-09"
|
|
58
|
+
},
|
|
59
|
+
"last_period_incomplete": true,
|
|
60
|
+
"measure": {
|
|
61
|
+
"label": "Number of Jobs Ended",
|
|
62
|
+
"description": "Jobs run",
|
|
63
|
+
"kind": "total",
|
|
64
|
+
"missing": "zero",
|
|
65
|
+
"unit": "jobs"
|
|
66
|
+
},
|
|
67
|
+
"dimension": {
|
|
68
|
+
"name": "resource",
|
|
69
|
+
"ordered": false
|
|
70
|
+
},
|
|
71
|
+
"filters": {
|
|
72
|
+
"notes": []
|
|
73
|
+
},
|
|
74
|
+
"time_basis": {
|
|
75
|
+
"zone": "America/New_York"
|
|
76
|
+
},
|
|
77
|
+
"instance": {
|
|
78
|
+
"name": "ACCESS XDMoD",
|
|
79
|
+
"url": "https://xdmod.access-ci.org"
|
|
80
|
+
},
|
|
81
|
+
"warnings": [
|
|
82
|
+
{
|
|
83
|
+
"code": "waiting-not-counted",
|
|
84
|
+
"text": "Jobs still waiting aren't counted, and the last few days may be incomplete."
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"offset": 0,
|
|
88
|
+
"data_through": "2026-10-01",
|
|
89
|
+
"data_through_precision": "day",
|
|
90
|
+
"others_count": 0,
|
|
91
|
+
"last_data_period_partial": false,
|
|
92
|
+
"has_more": false,
|
|
93
|
+
"ranked_by": "value",
|
|
94
|
+
"link": "https://xdmod.example/chart",
|
|
95
|
+
"source": "XDMoD",
|
|
96
|
+
"retrieved": "2026-11-09",
|
|
97
|
+
"categories": [
|
|
98
|
+
{
|
|
99
|
+
"name": "cluster-a",
|
|
100
|
+
"value": 2
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "cluster-b",
|
|
104
|
+
"value": 1
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
}
|