kibana/packages/presentation/presentation_containers/interfaces/performance_trackers.ts
Devon Thomson e3f8817007
[Dashboard] Resolve flaky telemetry, track load type (#184061)
Resolves Dashboard telemetry flakiness and tracks the type of dashboard load.
2024-06-04 14:27:52 -04:00

25 lines
852 B
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export interface TrackContentfulRender {
/**
* A way to report that the contentful render has been completed
*/
trackContentfulRender: () => void;
}
export const canTrackContentfulRender = (root: unknown): root is TrackContentfulRender => {
return root !== null && typeof root === 'object' && 'trackContentfulRender' in root;
};
export interface TracksQueryPerformance {
firstLoad: boolean;
creationStartTime?: number;
creationEndTime?: number;
lastLoadStartTime?: number;
}