rickub/ci-benchpublic Fork 0
28dfdd85f941bb437ac07ec08870550bde4a53a3
Commits
Clone
git clone https://git.rickub.com/rickub/ci-bench.git
git clone ssh://git@rickub.com/rickub/ci-bench.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

join_push_times.py · 26 lines · 870 BPython Blame HistoryRaw
bench round 2: real-world suite results (n=11, 22/22 green) + publishable blog draft + durable push-times joiner 6b67a7e Olivier Girardot 7h ago1#!/usr/bin/env python3
2"""join_push_times.py — build compare.py's --push-times map from push-times.jsonl.
3
4Joins each collected run (results/<platform>/<run-id>.json, keyed by the
5run_id embedded in its records) to its push timestamp via the 7-char short
6sha both carry. Emits {"<platform>/<run_id>": "<iso8601>", ...}.
7"""
8import json, glob, sys
9
10pushes = {}
11for line in open('push-times.jsonl'):
12 r = json.loads(line)
13 pushes[(r['platform'], r['sha'][:7])] = r['pushed_at']
14
15out = {}
16for f in sorted(glob.glob('results/*/*.json')):
17 recs = json.load(open(f))
18 if not recs:
19 continue
20 rid, plat = recs[0]['run_id'], recs[0]['platform']
21 key = (plat, rid.split('-')[-1])
22 if key in pushes:
23 out[f'{plat}/{rid}'] = pushes[key]
24
25json.dump(out, open('push-times.json', 'w'), indent=1)
26print(f'join_push_times: {len(out)} runs matched')