export type FlameGraphNode = { fn: number; acc: number; parent: number; children: FlameGraphNode[]; }; export async function flameGraphData(): Promise { return await fetch("/api/flame-graph") .then((v) => v.json()) .then((v) => v.flameGraph); } export type FlameGraphFnNames = { [key: number]: string }; export async function flameGraphFnNames(): Promise { return await fetch("/api/flame-graph-fn-names") .then((v) => v.json()) .then((v) => v.fnNames); } export async function codeData(): Promise { return await fetch("/api/source") .then((v) => v.json()) .then((v) => v.text); } export type CodeCovEntry = { index: number; line: number; col: number; covers: number; }; export async function codeCoverageData(): Promise { return await fetch("/api/code-coverage") .then((v) => v.json()) .then((v) => v.codeCoverage); }