gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitf6d32341f6d32341log: Apollo on budget and #25 nextmref6d32341/reports/W62/measure.py

1.6 KB

  1. import http.client,time,json,statistics,concurrent.futures,pathlib
  2. D=pathlib.Path('/media/STORAGE/claude-scratch/gitoria/W62'); log=D/'server.log'
  3. sha='50307fb70d28305efb345d6456ee12494a28840f'
  4. paths={'readme':'/','file':'/commit/'+sha+'/tests/subagents.mjs','directory':'/commit/'+sha+'/reports'}
  5. def req(path):
  6. t=time.perf_counter(); c=http.client.HTTPConnection('127.0.0.1',8730,timeout=120); c.request('GET',path,headers={'Host':'routger.gitoria.test:8730'}); r=c.getresponse(); b=r.read();c.close();return {'ms':round((time.perf_counter()-t)*1000,3),'status':r.status,'bytes':len(b)}
  7. for i in range(180):
  8. try:
  9. c=http.client.HTTPConnection('127.0.0.1',8730,timeout=1);c.connect();c.close();break
  10. except OSError: time.sleep(1)
  11. else: raise Exception('not listening after 180s')
  12. results={}
  13. for name,path in paths.items():
  14. results[name]=[]
  15. for i in range(5):
  16. pos=log.stat().st_size; r=req(path);time.sleep(.05);r['parts']=log.read_text()[pos:];results[name].append(r)
  17. print(name,i,r['ms'],r['status'],flush=True)
  18. (D/(name+'.json')).write_text(json.dumps(results[name],indent=2))
  19. (D/(name+'.html')).write_bytes(b'')
  20. for rate,count in [(35/60,12),(2,16)]:
  21. rows=[]; start=time.perf_counter()
  22. with concurrent.futures.ThreadPoolExecutor(max_workers=32) as ex:
  23. futures=[]
  24. for i in range(count):
  25. time.sleep(max(0,start+i/rate-time.perf_counter()))
  26. futures.append(('file',ex.submit(req,paths['file'])))
  27. time.sleep(.025)
  28. futures.append(('readme',ex.submit(req,'/')))
  29. for name,f in futures: rows.append({'kind':name,**f.result()})
  30. results[str(rate)]=rows
  31. print('rate',rate,json.dumps(rows),flush=True)
  32. (D/'measurements.json').write_text(json.dumps(results,indent=2))

Branches

Latest commits

  • f6d32341log: Apollo on budget and #25 nextmre
  • d7184f53log: batch live, #25 evidencemre
  • 5e25e816log: W61 mergedmre
  • aafe330dTidy: drop evidence JSON (kept in scratch), collapse blank linesmre
  • aca1fda1Merge W61: theme from layouts 17e0f03, Views refer to Style rules (gitoria#37 #27)mre
  • 03cb650blog: W61 theme decisionmre
  • 248bce85Report final style gates, CSS mappings and 136 whole-image comparisonsmre
  • 153c344bRestore organization metadata exposed by the whole-image comparisonmre
  • 917a1465Update status gate assertions for the referenced state rulemre
  • 3cdb02c6Own settings feedback styles and explain connection-state classesmre
  • 00d5d6c4Reference code-entry styles and nest code-browser media and pseudosmre
  • 3c425eddReference PR content styles and explain dynamic state classesmre
  • e46fa222Own shell feedback styles and retain documented selector formsmre
  • c26084c4Reference repository list styles and nest its breakpointmre
  • f3e196b5Document Markdown direct-child selector remaindersmre
  • 70597528Reference pull list rules and explain runtime class predicatesmre
  • 1ce7ac24Reference ticket row and feedback styles from its Viewmre
  • 10cdf54bGive organization repository rows their own Style referencesmre
  • 0d019521Document shared class selectors in the styles-only filemre
  • c67404a7Scope token labels and feedback through the token Viewmre