Skip to content

Commit 2ef7013

Browse files
authored
Merge branch 'master' into remove-prettier
2 parents 5c2a1bc + 2f965e4 commit 2ef7013

3 files changed

Lines changed: 54 additions & 43 deletions

File tree

.github/workflows/crucible-ci.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
- name: Display changes
3232
run: echo '${{ toJSON(steps.filter.outputs) }}' | jq .
3333

34-
call-real-core-crucible-ci:
34+
call-real-core-release-crucible-ci:
3535
needs: changes
3636
if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.only-docs != 'true' }}
37-
uses: perftool-incubator/crucible-ci/.github/workflows/core-crucible-ci.yaml@main
37+
uses: perftool-incubator/crucible-ci/.github/workflows/core-release-crucible-ci.yaml@main
3838
with:
3939
ci_target: "CommonDataModel"
4040
ci_target_branch: "${{ github.ref }}"
@@ -44,14 +44,14 @@ jobs:
4444
ci_registry_auth: ${{ secrets.CRUCIBLE_CI_ENGINES_REGISTRY_AUTH }}
4545
quay_oauth_token: ${{ secrets.CRUCIBLE_QUAYIO_OAUTH_TOKEN }}
4646

47-
call-faux-core-crucible-ci:
47+
call-faux-core-release-crucible-ci:
4848
needs: changes
4949
if: ${{ github.event_name != 'workflow_dispatch' && needs.changes.outputs.only-docs == 'true' }}
50-
uses: perftool-incubator/crucible-ci/.github/workflows/faux-core-crucible-ci.yaml@main
50+
uses: perftool-incubator/crucible-ci/.github/workflows/faux-core-release-crucible-ci.yaml@main
5151

5252
crucible-ci-complete:
5353
runs-on: ubuntu-latest
54-
needs: [ call-real-core-crucible-ci, call-faux-core-crucible-ci ]
54+
needs: [ call-real-core-release-crucible-ci, call-faux-core-release-crucible-ci ]
5555
if: always()
5656
steps:
5757
- name: Check Results

queries/cdmq/get-result-summary.js

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -244,16 +244,14 @@ async function main() {
244244
process.exit(1);
245245
}
246246

247-
// Fetch iteration-level data in parallel: params, primary-period-name, samples, primary-metric
247+
// Fetch iteration-level data sequentially to avoid overwhelming OpenSearch
248248
var iterBody = { iterations: benchIterations };
249249
var paramsResp, periodNamesResp, samplesResp, primaryMetricsResp;
250250
try {
251-
[paramsResp, periodNamesResp, samplesResp, primaryMetricsResp] = await Promise.all([
252-
apiPost(baseUrl, runPrefix + '/iterations/params', iterBody),
253-
apiPost(baseUrl, runPrefix + '/iterations/primary-period-name', iterBody),
254-
apiPost(baseUrl, runPrefix + '/iterations/samples', iterBody),
255-
apiPost(baseUrl, runPrefix + '/iterations/primary-metric', iterBody)
256-
]);
251+
paramsResp = await apiPost(baseUrl, runPrefix + '/iterations/params', iterBody);
252+
periodNamesResp = await apiPost(baseUrl, runPrefix + '/iterations/primary-period-name', iterBody);
253+
samplesResp = await apiPost(baseUrl, runPrefix + '/iterations/samples', iterBody);
254+
primaryMetricsResp = await apiPost(baseUrl, runPrefix + '/iterations/primary-metric', iterBody);
257255
} catch (error) {
258256
console.error('Error fetching iteration data for run ' + runId + ': ' + error.message);
259257
process.exit(1);
@@ -263,16 +261,14 @@ async function main() {
263261
var iterSampleIds = samplesResp.samples;
264262
var iterPrimaryMetrics = primaryMetricsResp.primaryMetrics;
265263

266-
// Fetch sample-level data: statuses and primary period IDs
264+
// Fetch sample-level data sequentially
267265
var statusesResp, periodIdsResp;
268266
try {
269-
[statusesResp, periodIdsResp] = await Promise.all([
270-
apiPost(baseUrl, runPrefix + '/samples/statuses', { sampleIds: iterSampleIds }),
271-
apiPost(baseUrl, runPrefix + '/samples/primary-period-id', {
272-
sampleIds: iterSampleIds,
273-
periodNames: iterPrimaryPeriodNames
274-
})
275-
]);
267+
statusesResp = await apiPost(baseUrl, runPrefix + '/samples/statuses', { sampleIds: iterSampleIds });
268+
periodIdsResp = await apiPost(baseUrl, runPrefix + '/samples/primary-period-id', {
269+
sampleIds: iterSampleIds,
270+
periodNames: iterPrimaryPeriodNames
271+
});
276272
} catch (error) {
277273
console.error('Error fetching sample data for run ' + runId + ': ' + error.message);
278274
process.exit(1);
@@ -395,34 +391,23 @@ async function main() {
395391
// Fetch metric data in batches
396392
var batchedQuerySize = 10;
397393
var metricDataResults = new Array(sets.length);
398-
for (var batchStart = 0; batchStart < sets.length; batchStart += batchedQuerySize) {
399-
var batchEnd = Math.min(batchStart + batchedQuerySize, sets.length);
400-
var batchPromises = [];
401-
for (var b = batchStart; b < batchEnd; b++) {
402-
var s = sets[b];
403-
batchPromises.push(
404-
apiPost(baseUrl, '/api/v1/metric-data', {
405-
run: s.run,
406-
period: s.period,
407-
source: s.source,
408-
type: s.type,
409-
begin: s.begin,
410-
end: s.end,
411-
resolution: s.resolution,
412-
breakout: s.breakout
413-
})
414-
);
415-
}
416-
var batchResults;
394+
for (var b = 0; b < sets.length; b++) {
395+
var s = sets[b];
417396
try {
418-
batchResults = await Promise.all(batchPromises);
397+
metricDataResults[b] = await apiPost(baseUrl, '/api/v1/metric-data', {
398+
run: s.run,
399+
period: s.period,
400+
source: s.source,
401+
type: s.type,
402+
begin: s.begin,
403+
end: s.end,
404+
resolution: s.resolution,
405+
breakout: s.breakout
406+
});
419407
} catch (error) {
420408
console.error('Error fetching metric data for run ' + runId + ': ' + error.message);
421409
process.exit(1);
422410
}
423-
for (var b = 0; b < batchResults.length; b++) {
424-
metricDataResults[batchStart + b] = batchResults[b];
425-
}
426411
}
427412

428413
// Output the results

workshop.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"workshop": {
3+
"schema": {
4+
"version": "2020.03.02"
5+
}
6+
},
7+
"userenvs": [
8+
{
9+
"name": "crucible-controller",
10+
"requirements": [
11+
"nodejs"
12+
]
13+
}
14+
],
15+
"requirements": [
16+
{
17+
"name": "nodejs",
18+
"type": "distro",
19+
"distro_info": {
20+
"packages": [
21+
"nodejs"
22+
]
23+
}
24+
}
25+
]
26+
}

0 commit comments

Comments
 (0)