tracker
All repositories: gitoria
1.8 KB
// HM61: stable ties, repeated physical rows, paging, updates, and the photo snapshot.import { personsTable } from '../lib/shows.hl'import { noteViewRow, finishPeopleView, peoplePage, personTouched, peopleCount, photoQueueStart, photoQueueStep } from '../lib/people.hl'static seed = () => {let i = 0while (i < 63) {id = 'order-person-' + ip = { id = id name = 'Order ' + i urlSegment = 'order-' + i updatedAt = i < 30 ? 0 : (i < 50 ? 100 : 200) tmdbId = 70000000 + i oldId = id }personsTable.put(p)noteViewRow(&p)if (i == 5) { noteViewRow(&p) }i = i + 1}finishPeopleView()return true}static dump = (String label) => {if (peopleCount() != 64) { hlError(label + ': expected 64 entries') }console.log(label + ' count=' + peopleCount())for (page of ['1', '2', '3', '4', '0', '-1', 'bad']) {r = peoplePage(&page)out = []for (t of r.tiles) { out.push(t.href) }if (r.pages != 3 || r.tiles.length != (r.page == 3 ? 16 : 24)) { hlError(label + ': incorrect paging') }if (r.page == 1 && r.tiles[0].href != (label == 'initial' ? '/person/order-62' : '/person/order-new')) { hlError(label + ': incorrect first entry') }console.log(label + ' raw=' + page + ' page=' + r.page + ' pages=' + r.pages + ' ' + JSON.stringify(out))}return true}static run = () => {seed()dump('initial')c = photoQueueStart()personTouched('order-person-5')personTouched('order-person-12')personTouched('order-person-5')p = { id = 'new-order-person' name = 'New' urlSegment = 'order-new' tmdbId = 70009999 oldId = 'new-order-person' }personsTable.put(p)personTouched(&p.id)dump('updated')dump('revisit')while (!photoQueueStep(&c)) { }if (c.out.length != 64 || c.out[0] != 'order-person-62' || c.out[57] != 'order-person-5' || c.out[58] != 'order-person-5') { hlError('photo snapshot changed') }console.log('snapshot ' + JSON.stringify(c.out))return true}run()
Branches
Latest commits
- b5357ac4Pack the people order and release completed startup arraysmre
- 2e7d6257log: HM1 startedmre
- 2f790465mission HM1: heap object breakdownmre
- a18957falog: evening re-measure after CBmre
- 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