gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmaind2e6d26bMerge branch 'records-park55' into mainTrackermain/tests/photoqueue.hl

1.6 KB

  1. // tests/photoqueue.hl — mission 046: the sliced photo queue (people.hl photoQueueStart/Step) must equal the former one-shot photoQueue
  2. // (inlined below, verbatim) — same ids, same order. On a store copy (app stopped). TRACKER_PHOTOQ_MARK=1 first marks every 3rd person
  3. // (photoCheck) and every 5th (tmdbProfile) so the predicate has both outcomes; TRACKER_SLICE_MS=0 forces many ticks.
  4. import { env } from 'hl:proc'
  5. import { now } from 'hl:time'
  6. import { personsTable } from '../lib/shows.hl'
  7. import { peopleView, peopleViewCurrent, needsPhoto, photoQueueStart, photoQueueStep } from '../lib/people.hl'
  8. oldQueue = () => {
  9. peopleViewCurrent()
  10. out = []
  11. for (id of peopleView.ids) {
  12. let p = personsTable.fetch(id)
  13. if (p != null && needsPhoto(&p)) { out.push(id) }
  14. }
  15. return out
  16. }
  17. if (env('TRACKER_PHOTOQ_MARK') == '1') {
  18. i = 0
  19. for (p of personsTable.find(null, null)) {
  20. x = p
  21. if (i % 3 == 0) { x.photoCheck = 'TMDB has none' } else if (i % 5 == 0) { x.tmdbProfile = '/x.jpg' }
  22. personsTable.update(x.id, x)
  23. i = i + 1
  24. }
  25. }
  26. t0 = now()
  27. a = env('TRACKER_PHOTOQ_NOOLD') == '1' ? [] : oldQueue()
  28. t1 = now()
  29. c = photoQueueStart()
  30. maxTick = 0
  31. while (true) {
  32. s = now()
  33. done = photoQueueStep(&c)
  34. d = now() - s
  35. if (d > maxTick) { maxTick = d }
  36. if (done) { break }
  37. }
  38. b = c.out
  39. console.log('new queue built: ' + b.length)
  40. same = a.length == b.length
  41. i = 0
  42. while (same && i < a.length) { if (a[i] != b[i]) { same = false } i = i + 1 }
  43. console.log('people ' + peopleView.ids.length + ' old=' + a.length + ' (' + (t1 - t0) + ' ms one block) new=' + b.length + ' ticks=' + c.steps + ' skipped=' + c.skipped + ' scanMs=' + c.ms + ' maxTickMs=' + maxTick)
  44. console.log(same ? 'SAME ORDER AND IDS' : 'DIFFERENT')

Branches

Latest commits

  • d2e6d26bMerge branch 'records-park55' into mainTracker
  • f567f025|||PR records: park #55, no Claude workers ruleTracker
  • c21aff6bMerge branch 'records-hm55c' into mainTracker
  • 9ba258d3|||PR records: HM55b resultTracker
  • 64f2d300Merge branch 'records-hm55b2' into mainTracker
  • ae3b80dc|||PR records: HM55b briefTracker
  • 7ef3cb3bMerge branch 'records-st55' into mainTracker
  • fec2e080|||PR records: STATUS HM55Tracker
  • 8e174918Merge branch 'records-hm55b' into mainTracker
  • b1ecee57|||PR records: HM55 stateTracker
  • 28eab08cMerge branch 'records-hm55' into mainTracker
  • d3edaa05|||PR records: HM55 start, PROCEDURES.mdTracker
  • 3059f86cMerge branch 'records-design-rule' into mainTracker
  • 421a4809|||PR records: his-design rule (Apollo 2026-11-13)Tracker
  • d1390692Merge branch 'records-dp75b' into mainTracker
  • a4d1a7d2|||PR records: later steps checked, branch auditTracker
  • e070e16fMerge branch 'records-dp75' into mainTracker
  • 642b4fa8|||PR records: DP75 day62 live, AP62 briefTracker
  • bfc4ea4dMerge branch 'ap62' into mainTracker
  • 2c95ac46|||PR AP62: re-vendor Hybriel set day62 (source 70341ad2, bin a54f5f08)Tracker