mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(durable): keep pi.live cached in the partial-commit cost test
The suite's evicting run (PI_DURABLE_DOCUMENT_RETENTION_MS=0) evicts the unwatched pi.live after every commit, so each partial commit replayed the document's delta chain and the per-commit cost grew with the stream. Pin the document retention in that test so it measures appends, as the default retention does.
This commit is contained in:
parent
da412b0392
commit
1e42501bb3
1 changed files with 3 additions and 0 deletions
|
|
@ -690,6 +690,9 @@ describe("streamed partials", () => {
|
|||
const stream = async (size: number) => {
|
||||
const setup = chatSetup({ tokensPerSecond: 64_000, tokenSize: { min: 64, max: 64 } });
|
||||
setup.settings.progress = { partialIntervalMs: 1, outputIntervalMs: 100 };
|
||||
// Keep `pi.live` cached between commits, as the default retention does. Evicted after each use (the suite's
|
||||
// evicting run), every commit replays the document's delta chain: a cost of eviction, not of appending.
|
||||
setup.settings.documentRetentionMs = 60_000;
|
||||
const text = 'streamed text with "quotes" and \\ escapes\n'.repeat(size / 40);
|
||||
setup.faux.setResponses([
|
||||
fauxAssistantMessage(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue