MCPcopy Create free account
hub / github.com/MemTensor/MemOS / serveMetrics

Method serveMetrics

packages/memos-core/src/viewer/server.ts:652–656  ·  view source on GitHub ↗
(res: http.ServerResponse, url: URL)

Source from the content-addressed store, hash-verified

650 }
651
652 private serveMetrics(res: http.ServerResponse, url: URL): void {
653 const days = Math.min(90, Math.max(7, Number(url.searchParams.get("days")) || 30));
654 const data = this.store.getMetrics(days);
655 this.jsonResponse(res, data);
656 }
657
658 private serveToolMetrics(res: http.ServerResponse, url: URL): void {
659 const fromParam = url.searchParams.get("from");

Callers 1

handleRequestMethod · 0.95

Calls 3

jsonResponseMethod · 0.95
getMethod · 0.65
getMetricsMethod · 0.45

Tested by

no test coverage detected