gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitaac9a98daac9a98dlog: evening re-measure startmreaac9a98d/tools/count-duplicate-ids.hl

943 B

  1. // tools/count-duplicate-ids.hl — mission 047 (hybriel#113): duplicate @ids per table. ONLY on a COPY (opening a table rewrites
  2. // its files): TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb ./bin/hybriel tools/count-duplicate-ids.hl
  3. import { MPackDB } from 'hl:mpackdb'
  4. import { env } from 'hl:proc'
  5. dir = env('TRACKER_STORAGE')
  6. for (t of ['episodes', 'follows', 'genres', 'persons', 'seasons', 'shows', 'users', 'watches']) {
  7. let idx = t == 'users' ? ['!identity'] : ['!oldId']
  8. let db = new MPackDB(file = dir + '/' + t + '.db', primaryKey = '@id', indexes = idx)
  9. let seen = {}
  10. let rows = 0
  11. let dupIds = 0
  12. let dupRows = 0
  13. for (r of db.find(null, null)) {
  14. rows = rows + 1
  15. let k = '' + r.id
  16. if (seen[k] == null) { seen[k] = 1 } else {
  17. if (seen[k] == 1) { dupIds = dupIds + 1 }
  18. seen[k] = seen[k] + 1
  19. dupRows = dupRows + 1
  20. }
  21. }
  22. print(t + ' rows=' + rows + ' duplicateIds=' + dupIds + ' extraRows=' + dupRows)
  23. }

Branches

Latest commits

  • aac9a98dlog: evening re-measure startmre
  • 45163bd4log: person/tmdb error hypothesismre
  • cb38de2blog: swap 503 causemre
  • fd10c3d5log: CB livemre
  • 7557c025log: CB deploy try 2mre
  • 06a7534aMerge branch 'cb'mre
  • 2f8030d6log: CB gates greenmre
  • 498bf644log: CB gates startmre
  • f59c2847gc1: bound the five request caches (shows.hl cacheLimit)mre
  • 6ea2c6d6log: morning re-measure 11-04mre
  • 446290f0log: GC1 livemre
  • 8e6aa91dlog: GC1 deploy retrymre
  • 87ad2dc1log: GC1 deployingmre
  • 53f10fb8Merge branch 'gc1-deploy'mre
  • 7fcbf1d2log: GC1 deploy GOmre
  • 1fb6664bcompose: TRACKER_QSTATS=1 (GC1 measurement)mre
  • 6576c1cdgc1: release the people-view scan lists once the view is builtmre
  • 94f8a373gc1: back out the kept episode-id set (no measurable gain on /my/unwatched: 4.69 -> 4.61 GB per 150 loads)mre
  • a1a88bd4gc1: search skips the stale-key string while no entry is stale; /my/unwatched asks a kept id set instead of building a key string per episode rowmre
  • cd830744gc1: dbSearch: no split / map / list copy per candidate (scores from the stored text, top list touched only when the hit can enter)mre