UNPKG

@zendesk/react-measure-timing-hooks

Version:

react hooks for measuring time to interactive and time to render of components

15 lines (13 loc) 406 B
import type { Span } from '../spanTypes' import { TraceManager } from '../TraceManager' import type { RelationSchemasBase } from '../types' export function processSpans< const RelationSchemasT extends RelationSchemasBase<RelationSchemasT>, >( spans: Span<RelationSchemasT>[], traceManager: TraceManager<RelationSchemasT>, ) { spans.forEach((span, i) => { traceManager.processSpan(span) }) }