-
Notifications
You must be signed in to change notification settings - Fork 91
[wip] investigate soak test failures #1791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e1fcd68
bb58322
60594c2
56a0a56
a40ae55
6d0340c
70caa46
119f586
42b6a38
80665ad
90f65b0
a4ad01e
3e8670e
677e526
de9d72c
3addc27
e551505
89b7f59
6ac0fd3
2ecffce
95d171e
98ceffd
d06db12
81f6b9e
0f4017c
5a99f2a
c72ba37
b92011f
cce87b6
725e6f5
26cae44
ba99fbf
84db8e1
4f47c12
b2ddb9b
ca14a7b
adc8f23
238145c
0707e90
b6b8be6
6c471bc
4611a5b
fd81d0c
54a27ef
73c98eb
7df3884
c54dd61
4db9afa
299fecc
815ca61
e4cb2a3
fb2a93a
07a75a5
47317e8
f0da124
f5c83ff
eaf5f2f
866b5cb
2c59e99
d62ac49
49d2be9
ed4007d
aab836a
663430f
c6e2732
9363a5b
2ed2d2f
5f0872f
50827a7
3c35f90
0aea819
91747cb
9241ebd
9333a9d
1c9a1cd
95f29da
b565242
7af2cf3
4663227
e154f9b
ec2a2e7
496d5f7
6e344bf
6d16a55
34dcc65
771f6f7
5edd34c
5a8843f
8e4cf74
9abc538
df50316
686ff9e
57e5f79
6c1a733
0c25e3b
7fff26d
785a6c7
f68d242
7298983
39602ab
42ca8c5
126eb42
f2ddeb7
8af9b2d
67726cf
a68d110
56bb5ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. discard when investigation complete |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| const { execSync } = require('node:child_process'); | ||
| const { readdirSync, readFileSync } = require('node:fs'); | ||
|
|
||
| const log = (...args) => console.log('[analyse-queries]', ...args); | ||
|
|
||
| const rootDir = './gha-logs'; | ||
|
|
||
| const [,,...args] = process.argv; | ||
| const runId = args.length ? args[0] : execSync(`ls -td ${rootDir}/* | head -1`, { encoding:'utf8' }).substring(rootDir.length + 1).trim(); | ||
| log('run id:', runId); | ||
|
|
||
| const allActiveQueries = {}; | ||
|
|
||
| for( const att of readdirSync(`${rootDir}/run-${runId}`)) { | ||
| for(const _f of readdirSync(`${rootDir}/run-${runId}/${att}`)) { | ||
| const f = `${rootDir}/run-${runId}/${att}/${_f}`; | ||
| log('Processing:', f); | ||
|
|
||
| const queryPrefix = 'Open queries: '; | ||
| const activeQueries = readFileSync(f, 'utf8') | ||
| .split('\n') | ||
| .filter(it => it.includes(queryPrefix)) | ||
| .map(it => { | ||
| const [ prefix, json ] = it.split(queryPrefix); | ||
| return JSON.parse(json) | ||
| .filter(it => it.state !== 'idle') | ||
| .map(q => { | ||
| const logged_at = new Date(prefix.match(/2026-\S*Z/)[0]); | ||
| const query_start = new Date(q.query_start); | ||
| return { | ||
| ...q, | ||
| logged_at, | ||
| query_start, | ||
| duration_so_far: logged_at.valueOf() - query_start.valueOf(), | ||
| }; | ||
| }); | ||
| }); | ||
|
|
||
| const lastQueries = activeQueries.at(-1); | ||
| log(' last activeQueries:', lastQueries); | ||
|
|
||
| activeQueries | ||
| .flat() | ||
| .forEach(processQuery); | ||
| } | ||
|
|
||
| log(' Done.'); | ||
| } | ||
|
|
||
| console.log('allActiveQueries:', JSON.stringify(allActiveQueries, null, 2)); | ||
|
|
||
| function processQuery({ state, duration_so_far, query }) { | ||
| if(!allActiveQueries[query]) allActiveQueries[query] = duration_so_far; | ||
| allActiveQueries[query] = Math.max(allActiveQueries[query], duration_so_far); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discard when investigation complete