MCPcopy
hub / github.com/aidenybai/react-scan / getTotalTime

Function getTotalTime

packages/scan/src/web/views/notifications/data.ts:36–60  ·  view source on GitHub ↗
(
  timing: InteractionTiming | DroppedFramesTiming,
)

Source from the content-addressed store, hash-verified

34};
35
36export const getTotalTime = (
37 timing: InteractionTiming | DroppedFramesTiming,
38) => {
39 switch (timing.kind) {
40 case 'interaction': {
41 const {
42 renderTime,
43 otherJSTime,
44 framePreparation,
45 frameConstruction,
46 frameDraw,
47 } = timing;
48 return (
49 renderTime +
50 otherJSTime +
51 framePreparation +
52 frameConstruction +
53 (frameDraw ?? 0)
54 );
55 }
56 case 'dropped-frames': {
57 return timing.otherTime + timing.renderTime;
58 }
59 }
60};
61
62export type DroppedFramesTiming = {
63 kind: 'dropped-frames';

Callers 13

getLLMPromptFunction · 0.90
RenderBarChartFunction · 0.90
MoreInfoFunction · 0.90
NotificationHeaderFunction · 0.90
getTimeDataFunction · 0.90
OtherVisualizationFunction · 0.90
getDrawInputFunction · 0.90
getRenderInputFunction · 0.90
getJSInputFunction · 0.90
SlowdownHistoryItemFunction · 0.90
getTimeSplitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…