gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitf57f64f0f57f64f0mission 046: report, LOGmref57f64f0/tests/slices-bench.hl

1.4 KB

  1. // tests/slices-bench.hl — mission 044: the longest block a sliced job scan makes (one collectStep / mergePrepare call = what one timer tick
  2. // 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.
  3. // TRACKER_STORAGE=<store> ./bin/hybriel tests/slices-bench.hl
  4. import { now } from 'hl:time'
  5. import { showsTable } from '../lib/shows.hl'
  6. import { collectStart, collectStep, collected } from '../lib/slices.hl'
  7. import { mergePrepare } from '../lib/merge.hl'
  8. import { adultBackfillScan, adultPred } from '../lib/backfill.hl'
  9. t0 = now()
  10. n = 0
  11. for (s of showsTable.find(null, null)) { n = n + 1 }
  12. console.log('OLD find(null,null) over ' + n + ' shows: ONE block of ' + (now() - t0) + ' ms')
  13. c = adultBackfillScan()
  14. let calls = 0
  15. let maxMs = 0
  16. let sum = 0
  17. t1 = now()
  18. while (true) {
  19. let a = now()
  20. done = collectStep(c, adultPred)
  21. let d = now() - a
  22. if (d > maxMs) { maxMs = d }
  23. sum = sum + d
  24. calls = calls + 1
  25. if (done) { break }
  26. }
  27. console.log('NEW adult scan: ' + calls + ' ticks, longest tick ' + maxMs + ' ms, total ' + sum + ' ms, ' + collected(c).length + ' ids')
  28. t1 = now()
  29. calls = 0
  30. maxMs = 0
  31. while (true) {
  32. let a = now()
  33. done = mergePrepare()
  34. let d = now() - a
  35. if (d > maxMs) { maxMs = d }
  36. calls = calls + 1
  37. if (done) { break }
  38. }
  39. console.log('NEW merge prepare: ' + calls + ' ticks, longest tick ' + maxMs + ' ms, total ' + (now() - t1) + ' ms')

Branches

Latest commits

  • f57f64f0mission 046: report, LOGmre
  • 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
  • 23375c58mission 044: report, LOG, STATUSmre
  • c6fd928emission 044: 4096 slices for tables over 200 K rows, 15 ms budget, TRACKER_SLICE_DEPTH for testsmre
  • fb057680mission 044: jobs.hl imports mergeLeft (gate found it), mission file, slices benchmre
  • 0d6293ebmission 043: mission filemre