{"version":3,"file":"components/Charts/types.mjs","sources":["../../../src/components/Charts/types.ts"],"sourcesContent":["import { SDK } from \"@rsdoctor/types\";\n\nexport interface ChartProps {\n  loaders: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderChartData>;\n  cwd: string;\n}\n\nexport interface CommonMetricPart<T extends string = string> {\n  _n?: boolean;\n  _c?: string;\n  p: string;\n  n: T;\n  ext?: unknown;\n}\n\nexport declare type Metric = DurationMetric;\nexport interface DurationMetric extends CommonMetricPart {\n  _r?: [start: string, end: string];\n  s: number;\n  e: number;\n  c?: DurationMetric[];\n}\n\n// Trace Events.\nexport enum ETraceEventPhase {\n  // Standard\n  BEGIN = 'B',\n  END = 'E',\n  COMPLETE = 'X',\n  INSTANT = 'I',\n\n  // Mark\n  MARK = 'R',\n}\n\ntype MicroSeconds = number;\ntype ProcessID = number | string;\ntype ArgsType = {\n  p: string,\n  n: string,\n  s: number,\n  e: number,\n}\n\nexport interface ITraceEventData {\n  /**\n   *Any arguments provided for the event. Some of the event types have required argument fields, otherwise, you can put any information you wish in here. The arguments are displayed in Trace Viewer when you view an event in the analysis section.\n   */\n  args: ArgsType;\n  /**\n   * The name of the event, as displayed in Chart.\n   */\n  name: string;\n  /**\n   * The event type. This is a single character which changes depending on the type of event being output.\n   */\n  ph: ETraceEventPhase;\n  /**\n   *  The process ID for the process that output this event.\n   */\n  pid: ProcessID;\n  /**\n   *  The tracing clock timestamp of the event. The timestamps are provided at microsecond granularity.\n   */\n  ts: MicroSeconds;\n  /**\n   *  specify the tracing clock duration of complete events in microseconds.\n   */\n  dur?: MicroSeconds;\n}"],"names":["ETraceEventPhase"],"mappings":"AAwBO,IAAKA,yBAAgBA,WAAAA,GAAAA,SAAhBA,gBAAgB;;;;;;WAAhBA"}