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
- a6dfd6ecdeploy: person-lookup gate (tracker#46)mre
- 33ad4bd5Merge commit 'f57f64f'mre
- 7d38cec4docker-compose: nofile 65536 (default soft 1024 refused boot: errno 24 in fs.listDir, Hybriel 528bc89f)mre
- f57f64f0mission 046: report, LOGmre
- 5965963adeploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
- efe1b485mission 046: re-vendor Hybriel master 60b2817b (integration 8, #203): plugins mpackdb + web (bin/ git-ignored: hybriel, libhlrt.a, hlc.o, hlrt/ from native/zig-out)mre
- 53099ffbmission 046: person page reads a slim per-title credit row cache (no whole-record fetch per credit); gate tests/person-lookup.mjsmre
- 9b3828aemission 046a: report, LOGmre
- 4b37356emission 046: franchise seed supersedeCollections reads the curated timelines once (10 s one-tick block at the end of boot)mre
- ac6268e3mission 046a: re-vendor Hybriel 528bc89f (integration 6): plugins mpackdb/time/web (bin/ git-ignored)mre
- 322b3293mission 046: photoQueue guard for non-row fetch results (damaged persons index)mre
- e5b99aecmission 046: photoQueue in slices (people.hl photoQueueStart/Step, jobs.hl photoTick), tests/photoqueue.hlmre
- 31dcf2admission 045: report, LOGmre
- 9c3971d0tests/persons-skip-count.hlmre
- 4d72e365mission 045mre
- b9cae4c9slices: skip and count non-row values from range(); merge persons pass falls back to iterate; guard testmre
- 3db7dc31merge w44-jobs-slices into w43-trkmemmre
- 593dab6fmission 043: report, LOGmre
- 1a5a4818boot scans back to iterate (slices measured slower: titles 114 s, episodes 141 s, persons failed); lambda per rowmre
- 03d29893boot scans read primary-key slices (lib/slices.hl from mission 044): iterate is eager too; people view log line back; allShows/allEpisodes stay for toolsmre