rickub/ci-benchpublic Fork 0
6b67a7ef1caf6851afedfcbffa9de16df998b013
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.

bench round 2: real-world suite results (n=11, 22/22 green) + publishable blog draft + durable push-times joiner 6b67a7eUnverified · on 6b67a7ef1caf6851afedfcbffa9de16df998b013 · Olivier Girardot · 4h ago
join_push_times.py · 26 lines · 870 BPython Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python3
"""join_push_times.py — build compare.py's --push-times map from push-times.jsonl.

Joins each collected run (results/<platform>/<run-id>.json, keyed by the
run_id embedded in its records) to its push timestamp via the 7-char short
sha both carry. Emits {"<platform>/<run_id>": "<iso8601>", ...}.
"""
import json, glob, sys

pushes = {}
for line in open('push-times.jsonl'):
    r = json.loads(line)
    pushes[(r['platform'], r['sha'][:7])] = r['pushed_at']

out = {}
for f in sorted(glob.glob('results/*/*.json')):
    recs = json.load(open(f))
    if not recs:
        continue
    rid, plat = recs[0]['run_id'], recs[0]['platform']
    key = (plat, rid.split('-')[-1])
    if key in pushes:
        out[f'{plat}/{rid}'] = pushes[key]

json.dump(out, open('push-times.json', 'w'), indent=1)
print(f'join_push_times: {len(out)} runs matched')