Files
yulunz 71d897b27e chore: add a new profiler scenario for get_console_messages. (#2491)
To see the heap size increase the scenario has to be run with
warmup-iterations=0. I have made the number of iterations different by
scenario, unless they are overriden through the command line.

Once we have the fixes all merged, I will add an assert somewhere and
see if this can be added into the test suite.
2026-08-07 10:24:40 +00:00

39 lines
777 B
TypeScript

/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
export interface ScenarioArgs {
targetUrl: string;
outputDir: string;
[key: string]: unknown;
}
export interface ToolCallContext {
results: unknown[];
}
export type ToolArguments =
| Record<string, unknown>
| ((
context: ToolCallContext,
) => Record<string, unknown> | Promise<Record<string, unknown>>);
export interface ToolCall {
name: string;
arguments?: ToolArguments;
}
export interface ScenarioIterations {
iterations?: number;
warmupIterations?: number;
}
export interface ProfileScenario {
name?: string;
description?: string;
getNumIterations?: () => ScenarioIterations;
get: (args: ScenarioArgs) => ToolCall[] | Promise<ToolCall[]>;
}