MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getAll

Function getAll

src/context/stats.tsx:77–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75 s.add(value);
76 },
77 getAll() {
78 const result: Record<string, number> = Object.fromEntries(metrics);
79 for (const [name, h] of histograms) {
80 if (h.count === 0) {
81 continue;
82 }
83 result[`${name}_count`] = h.count;
84 result[`${name}_min`] = h.min;
85 result[`${name}_max`] = h.max;
86 result[`${name}_avg`] = h.sum / h.count;
87 const sorted = [...h.reservoir].sort((a, b) => a - b);
88 result[`${name}_p50`] = percentile(sorted, 50);
89 result[`${name}_p95`] = percentile(sorted, 95);
90 result[`${name}_p99`] = percentile(sorted, 99);
91 }
92 for (const [name, s] of sets) {
93 result[name] = s.size;
94 }
95 return result;
96 }
97 };
98}
99export const StatsContext = createContext<StatsStore | null>(null);

Callers

nothing calls this directly

Calls 1

percentileFunction · 0.85

Tested by

no test coverage detected