gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit4d72e3654d72e365mission 045mre4d72e365/tools/count-external-ids.hl

1.6 KB

  1. // tools/count-external-ids.hl — tracker.worldapi.org#12: how many shows (all / followed) have each external id (tmdbId,
  2. // imdbId, tvdbId, tvmzId), per `type`. ONLY on a COPY or the stopped app (opening a table rewrites its files):
  3. // TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb ./bin/hybriel tools/count-external-ids.hl
  4. import { env } from 'hl:proc'
  5. import { showsTable } from '../lib/shows.hl'
  6. import { allFollowedShowIds } from '../lib/follows.hl'
  7. followed = {}
  8. for (id of allFollowedShowIds()) { followed[id] = true }
  9. has = (&v) => { return v != null && ('' + v).trim() != '' }
  10. counts = {}
  11. samples = {}
  12. bump = (&key, &show) => {
  13. let c = counts[key] != null ? counts[key] : { shows = 0 tmdbId = 0 imdbId = 0 tvdbId = 0 tvmzId = 0 }
  14. c.shows = c.shows + 1
  15. if (has(show.tmdbId)) { c.tmdbId = c.tmdbId + 1 }
  16. if (has(show.imdbId)) { c.imdbId = c.imdbId + 1 }
  17. if (has(show.tvdbId)) { c.tvdbId = c.tvdbId + 1 }
  18. if (has(show.tvmzId)) { c.tvmzId = c.tvmzId + 1 }
  19. counts[key] = c
  20. return null
  21. }
  22. for (s of showsTable.find(null, null)) {
  23. let t = s.type != null ? '' + s.type : 'null'
  24. bump('all ' + t, s)
  25. if (followed[s.id] == true) { bump('followed ' + t, s) }
  26. if (samples[t] == null) { samples[t] = 'tmdbId=' + s.tmdbId + ' (' + hlTypeName(s.tmdbId) + ') imdbId=' + s.imdbId + ' (' + hlTypeName(s.imdbId) + ') tvdbId=' + s.tvdbId + ' (' + hlTypeName(s.tvdbId) + ') tvmzId=' + s.tvmzId + ' (' + hlTypeName(s.tvmzId) + ')' }
  27. }
  28. for (k of counts.keys()) {
  29. let c = counts[k]
  30. print(k + ': shows=' + c.shows + ' tmdbId=' + c.tmdbId + ' imdbId=' + c.imdbId + ' tvdbId=' + c.tvdbId + ' tvmzId=' + c.tvmzId)
  31. }
  32. for (k of samples.keys()) { print('sample ' + k + ': ' + samples[k]) }

Branches

Latest commits

  • 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
  • d25bd14amission 044: sliced merge prepare + sliced collections prepare; jobs-dump old/new check + bulk fixturemre
  • 633ee210mission 044: sliced table scans (slices.hl, pk-range slices) for the adult/kind/status/art/credits/details-repair queuesmre
  • 55bbd619boot: one streamed pass per table (lib/bootscan.hl) instead of find(null,null) per module; follows/watches/franchises scans streammre
  • 1d465d3ere-vendor plugins to Hybriel master f9614007 (mpackdb #202 copy fix, libmpackdb sha 6fb3b9d6)mre
  • 6648ba44mission 042: real-browser E2E on ce6f2e0a re-vendor 69/0 at 390 + 1280mre
  • 3ed3a0efmission 042: gates old/new equal (browser #41 route-table regex accepts unescaped hl:web output), real-data TTFB, E2E blocked by lisbeth lockmre
  • d5b61e90LOG 042mre
  • 4acdbaccmission 042: memory comparison old vs ce6f2e0a (stopped: warm VmHWM higher), reportmre
  • d0f620d6mission 042: re-vendor Hybriel ce6f2e0a (plugins incl. mpackdb; bin runtime built from the same archive, git-ignored), compact=false keptmre
  • 5bd14e12mission 040: theme 76f99f6 gates + E2E green; 44 px fixes (skeleton row, type-word, genre-link/pill); README, reportmre