tracker
All repositories: gitoria
1.4 KB
// tests/slices-bench.hl — mission 044: the longest block a sliced job scan makes (one collectStep / mergePrepare call = what one timer tick// does) against the old whole-table scan, on a big store (tests/seed-bulk.hl with TRACKER_SEED_BULK=60000). Run with the app STOPPED.// TRACKER_STORAGE=<store> ./bin/hybriel tests/slices-bench.hlimport { now } from 'hl:time'import { showsTable } from '../lib/shows.hl'import { collectStart, collectStep, collected } from '../lib/slices.hl'import { mergePrepare } from '../lib/merge.hl'import { adultBackfillScan, adultPred } from '../lib/backfill.hl't0 = now()n = 0for (s of showsTable.find(null, null)) { n = n + 1 }console.log('OLD find(null,null) over ' + n + ' shows: ONE block of ' + (now() - t0) + ' ms')c = adultBackfillScan()let calls = 0let maxMs = 0let sum = 0t1 = now()while (true) {let a = now()done = collectStep(c, adultPred)let d = now() - aif (d > maxMs) { maxMs = d }sum = sum + dcalls = calls + 1if (done) { break }}console.log('NEW adult scan: ' + calls + ' ticks, longest tick ' + maxMs + ' ms, total ' + sum + ' ms, ' + collected(c).length + ' ids')t1 = now()calls = 0maxMs = 0while (true) {let a = now()done = mergePrepare()let d = now() - aif (d > maxMs) { maxMs = d }calls = calls + 1if (done) { break }}console.log('NEW merge prepare: ' + calls + ' ticks, longest tick ' + maxMs + ' ms, total ' + (now() - t1) + ' ms')
Branches
Latest commits
- 6cf40dbdrecords: mpackdb integrity check, shows uncheckedmre
- 1880f42arecords: day38 deploy may swap normallymre
- 9d806e35records: mpackdb freeze until day38mre
- a660239drecords: day37 lacks #277, wait for day38mre
- b0abfdeaLOG: Anton hybriel#277 fix ready for day37mre
- 7b5b2918Tracker: hybriel#277 fix comes in day37mre
- 7ddbeec8Tracker: RV28c blocked on day35 regressionmre
- bf401884Tracker: RV28c startedmre
- 0ff4ecd4Tracker: RV28c briefmre
- 06565b1fRecords: day35 relay note, tickets subscription idmre
- c6dc3e86RV28b: switch to set day35mre
- 24e401b8Tracker: TR7 watch cleanmre
- b0412957Tracker: RV28b handed overmre
- 456940c8Tracker: RULINGS pathmre
- b87a8fdcTracker: worldapi-conductor paths backmre
- 641f3b54Tracker: Apollo answermre
- 8b3cbddaTracker: status, TR7 fix livemre
- ec30162aTracker: TR7 fix livemre
- 54cbec80compose: ignore SIGPIPE (TR7 crash loop, exit 141)mre
- 3e164b63Tracker: status after CL1mre