MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / readExtractMetrics

Function readExtractMetrics

src/tools/web/extract-metrics.ts:54–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52
53/** Read + aggregate the metrics file (last 5000 events). Best-effort → zeros if absent. */
54export async function readExtractMetrics(): Promise<ExtractCounts> {
55 try {
56 const { promises: fs } = await import('fs');
57 const file = await metricsFile();
58 const text = await fs.readFile(file, 'utf-8');
59 const lines = text.split('\n');
60 return parseExtractMetrics(lines.slice(-5000).join('\n'));
61 } catch { return { semantic: 0, headTail: 0, truncated: 0, semanticRate: 0 }; }
62}

Callers 1

gatherDashboardDataFunction · 0.85

Calls 2

metricsFileFunction · 0.85
parseExtractMetricsFunction · 0.85

Tested by

no test coverage detected