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
- 05448a98Merge cb69-imports: appTitle in a dependency-free topicmre
- e55b379dKeep shared app title independent of the route import graphmre
- 9a99659blog: hybriel#334, batch waits for day48mre
- 85fa6c9blog: CB68 result, CB69 startedmre
- 2f07c1b7log: DP68 boot gate failed, CB68mre
- 9652782dlog: HM59 merged, DP68 startedmre
- 29867a75Merge hm59-logic: tracker#59 page logic moved to libmre
- f7bfe90bMove remaining page builders into their topicsmre
- 7c3991f9log: day46 from Antonmre
- ec54fc35Move show page logic into the shows topicmre
- c1a8d074log: correct timesmre
- 5827eba9log: HM57 merged, HM59 startedmre
- d1a91be9Merge hm57-let: tracker#57 let only for reassigned namesmre
- a404ed75Report HM57 audit, gates and integration notesmre
- 1dcb87a7Use plain declarations for unchanged bindingsmre
- b90395e3log: HM51 mergedmre
- 9888d076Merge hm51-classes: tracker#51 views use Style referencesmre
- 4399bc2fReference remaining component-owned root Style rulesmre
- 9edcc2dflog: #58 live, HM57 startedmre
- 73fa20ddMerge hm49b-styles: tracker#49 rest of the component stylesmre