gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Branchf2-api-bugs26117255|||PR apps API: review comments on files with spaces in their namemref2-api-bugs/reports/W62/followup.py

1.3 KB

  1. import http.client,time,json,concurrent.futures,pathlib,statistics,subprocess
  2. D=pathlib.Path('/media/STORAGE/claude-scratch/gitoria/W62')
  3. def req(port,path):
  4. t=time.perf_counter(); c=http.client.HTTPConnection('127.0.0.1',port,timeout=30);c.request('GET',path,headers={'Host':'routger.gitoria.test:8730'});r=c.getresponse();b=r.read();c.close();end=time.perf_counter();return {'start':t,'end':end,'ms':(end-t)*1000,'status':r.status,'bytes':len(b)}
  5. r={}
  6. for name,path in [('readme','/'),('file','/commit/50307fb70d28305efb345d6456ee12494a28840f/tests/subagents.mjs')]:
  7. r[name]=[]
  8. for i in range(7):
  9. pos=(D/'server.log').stat().st_size;a=req(8730,path);a['parts']=(D/'server.log').read_bytes()[pos:].decode();r[name].append(a)
  10. for i in range(120):
  11. try: a=req(8731,'/');break
  12. except OSError:time.sleep(1)
  13. r['repro']={}
  14. for path in ['/','/true','/sleep']:
  15. r['repro'][path]=[req(8731,path) for i in range(5)]
  16. with concurrent.futures.ThreadPoolExecutor(max_workers=2) as ex:
  17. f=ex.submit(req,8731,'/sleep');time.sleep(.025);g=ex.submit(req,8731,'/');r['blocking_pair']=[f.result(),g.result()]
  18. (D/'followup.json').write_text(json.dumps(r,indent=2))
  19. for k,v in r.items():
  20. if isinstance(v,list): print(k,statistics.median(x['ms'] for x in v),max(x['ms'] for x in v))
  21. else:
  22. for name,vs in v.items():print(k,name,statistics.median(x['ms'] for x in vs))
  23. print('blocking pair',r['blocking_pair'])

Branches

Latest commits

  • 26117255|||PR apps API: review comments on files with spaces in their namemre
  • b8796cecMerge branch 'f1-broken-json' into mainGitoria
  • 2f2959c5|||PR apps API: broken JSON body gives 400 invalid_json, not 500mre
  • f7c6ca07Merge branch 'ident-chooser-selector' into mainGitoria
  • 691abb8e|||PR tests: find ident identity choice without the removed .choose classmre
  • 16a3530fMerge branch 'heap-revert' into mainGitoria
  • 220a80e0|||PR Remove temporary /__heap route and heap helper; logmre
  • 13f0c342Merge branch 'hl25-records' into mainGitoria
  • a002ecb7|||PR records: HL25 report, heap helper, logmre
  • 2492a55cTemporary keyed /__heap route for the live memory snapshotmre
  • fefaedd2log: tracker PR-only, HL25 startedmre
  • 21aa57calog: parkmre
  • e9f950a8reports: G25c soakmre
  • a7783686log: deploy 9f41ffcmre
  • 9f41ffc1log: W30b mergedmre
  • bef635c1Merge branch 'w30b'mre
  • 15b996a5Org list: keyed rows by @id, newest first, concat instead of hand loopmre
  • c4f6d9e3reports: G25c growth huntmre
  • b88e39f1log: privacy cleanup donemre
  • bfd7826ddocs: neutral example organisation namemre