gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit9c3180eb9c3180eblog+status: RV28d measured after deploymre9c3180eb/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

  • 9c3180eblog+status: RV28d measured after deploymre
  • fdf10b1alog: RV28d deployed on day38bmre
  • 320005e9log: RV28d merged, deploy runningmre
  • a8fef27dRV28d: reportmre
  • 2bae8373RV28d: re-vendor Hybriel set day38b (source 1e554d75, bin 5ff2a46d)mre
  • 16b3354aMerge branch 'main' into rv28cmre
  • 6f4f27d8log: RV28d started (day38b)mre
  • e6cf03ffmission RV28d: rv28c onto day38bmre
  • 3ccaee19status: live sweep freeze, waiting for Apollomre
  • 49f76ecblog: watch toggle slowness = session sweep freeze (tracker#50)mre
  • 3daf6eddlog: day37 live, still waiting for day39mre
  • 796ba672records: #277 slips to day39mre
  • a9eb9827records: mpackdb integrity clean, all 12 tablesmre
  • 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