MCPcopy Index your code
hub / github.com/BlockRunAI/ClawRouter / clearStats

Function clearStats

src/stats.ts:361–372  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

359 * Delete all usage log files, resetting stats to zero.
360 */
361export async function clearStats(): Promise<{ deletedFiles: number }> {
362 try {
363 const files = await readdir(LOG_DIR);
364 const logFiles = files.filter((f) => f.startsWith("usage-") && f.endsWith(".jsonl"));
365
366 await Promise.all(logFiles.map((f) => unlink(join(LOG_DIR, f))));
367
368 return { deletedFiles: logFiles.length };
369 } catch {
370 return { deletedFiles: 0 };
371 }
372}

Callers 2

startProxyFunction · 0.85
createStatsCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected