Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

test(webv2): guard missing preset ack mark

joshistoast1baf42ad0ab2
diff --git a/invokeai/frontend/webv2/scripts/measure-architecture-performance.mjs b/invokeai/frontend/webv2/scripts/measure-architecture-performance.mjs
index 62f167b287..858f8e7834 100644
--- a/invokeai/frontend/webv2/scripts/measure-architecture-performance.mjs
+++ b/invokeai/frontend/webv2/scripts/measure-architecture-performance.mjs
@@ -401,10 +401,15 @@ const runSample = async (browser, fixture, sample) => {
({ ackMarkName, interactionMarkName }) => {
const start = performance.getEntriesByName(interactionMarkName, 'mark').at(-1);
const end = performance.getEntriesByName(ackMarkName, 'mark').at(-1);
- return start && end ? Math.max(0, end.startTime - start.startTime) : 0;
+ return start && end ? Math.max(0, end.startTime - start.startTime) : null;
},
{ ackMarkName: ackMark, interactionMarkName: interactionMark }
);
+ if (layoutAckMs === null) {
+ throw new Error(
+ `${fixture.id}/${fixture.stateProfile} did not record a layout-ack interaction for preset ${fixture.layoutPresetId}.`
+ );
+ }
}
const afterActivation = await resourceCollector.settle();
activatedResourcePaths = new Set(