The library read now, from adb, stopping at the first sign of strain (1.0 RC3-9, build 51)
Paul, 15 November 2026: read the whole library for the Director's Chair now rather than over five nights, and stop if the server starts straining. --ez orbit_catalogue_now true reads a page of 200 every 3 seconds, timing each; two slow pages in a row (over 5 s), a failed page, or --ez orbit_catalogue_now_stop true ends it. Household edition only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package tv.orbit.classic
|
||||
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Test
|
||||
|
||||
/** 15 November 2026: the library read now, stopping by itself at the first sign of strain. */
|
||||
class CatalogueNowTest {
|
||||
@Test fun oneSlowPageIsForgivenTwoInARowStopIt() {
|
||||
CatalogueNow.stop = false
|
||||
assertNull(CatalogueNow.verdict(1_000, false, 0))
|
||||
assertNull(CatalogueNow.verdict(6_000, false, 0))
|
||||
assertEquals("two slow pages in a row", CatalogueNow.verdict(6_000, false, 1))
|
||||
assertEquals("a page failed", CatalogueNow.verdict(500, true, 0))
|
||||
CatalogueNow.stop = true
|
||||
assertEquals("asked to stop", CatalogueNow.verdict(500, false, 0))
|
||||
CatalogueNow.stop = false
|
||||
}
|
||||
|
||||
@Test fun thePaceStaysWellUnderWhatTheServerHandled() {
|
||||
// 20 pages a minute at most, against ~126 requests a minute with no strain in the capacity test.
|
||||
assertTrue(60_000 / CatalogueNow.PAGE_GAP_MS <= 20)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user