@zendesk/react-measure-timing-hooks
Version:
react hooks for measuring time to interactive and time to render of components
9 lines (8 loc) • 757 B
TypeScript
import type { SpanAndAnnotation, SpanAnnotation } from '../spanAnnotationTypes';
import type { Span } from '../spanTypes';
import type { Timestamp } from '../types';
export declare const createTimestamp: (now: number) => Timestamp;
export type AnyRelation = Record<string, unknown>;
export declare const createAnnotation: (span: Span<AnyRelation>, traceStartTime: Timestamp, partial?: Partial<SpanAnnotation>) => SpanAnnotation;
export declare const createMockSpan: <TSpan extends Span<AnyRelation>>(startTimeNow: number, partial: Partial<TSpan>) => TSpan;
export declare const createMockSpanAndAnnotation: <TSpan extends Span<any>>(startTimeNow: number, spanPartial?: Partial<TSpan>, annotationPartial?: Partial<SpanAnnotation>) => SpanAndAnnotation<any>;