/** * Partially generated by AI */ import { CallStack } from "../Interceptor.types"; interface GenerateReportOptions { /** * Whether to include the request body in the report. * If a function is provided, it will be called with the URL of the request and should * return a boolean indicating whether the request body should be included. * * By default the request body is limited to 1000 characters. When provide `true` * the request body is included without any limit. * * If the request body is too big, it can affect the size of the report and the performance * of the report generation so you might need to increase the timeout in `writeOptions`. */ includeRequestBody?: boolean | ((url: URL) => boolean); /** * Whether to include the response body in the report. * If a function is provided, it will be called with the URL of the request and should * return a boolean indicating whether the response body should be included. * * By default the response body is limited to 1000 characters. When provide `true` * the response body is included without any limit. * * If the request body is too big, it can affect the size of the report and the performance * of the report generation so you might need to increase the timeout in `writeOptions`. */ includeResponseBody?: boolean | ((url: URL) => boolean); /** * The high duration for the report. * If a function is provided, it will be called with the URL of the request and should * return the high duration. If a number is provided, it will be used as the high duration * for all requests. */ highDuration?: number | ((url: URL) => number); /** * A filter function that can be used to filter the data points before generating the report. * The function will be called with each data point and should return a boolean indicating whether * the data point should be included in the report. */ filter?: (dataPoint: CallStack) => boolean; /** * The title of the report. */ title?: string; /** * The options for `cy.writeFile`. Available only when calling `generateReport` from a * Cypress test. */ writeOptions?: Partial; } /** * Generates an HTML report with a column chart showing duration over time * * @param statsFilePath Path to the stats file. The file must be sorted by timeStart * and the function must be called from node (not from cypress) * @param outputFileName Path where the HTML file will be created * @param options Options */ export declare function generateReport(statsFilePath: string, outputFileName: string, options?: GenerateReportOptions): void; /** * Generates an HTML report with a column chart showing duration over time * * @param data The call stack data * @param filePath Path where the HTML file will be created * @param options Options */ export declare function generateReport(data: CallStack[], filePath: string, options?: GenerateReportOptions): void; export {};