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

Function projectMonthly

src/cli/maintain-stats.ts:98–102  ·  view source on GitHub ↗
(runs: MaintainRun[], nowMs: number)

Source from the content-addressed store, hash-verified

96
97/** Project the going rate forward: cleanups + minutes saved per month, from the last 28 days. PURE. */
98export function projectMonthly(runs: MaintainRun[], nowMs: number): { cleanupsPerMonth: number; minutesPerMonth: number } {
99 const since = nowMs - 28 * 86_400_000;
100 const recent = runs.filter(r => r.status === 'opened' && r.at && Date.parse(r.at) >= since).length;
101 return { cleanupsPerMonth: recent, minutesPerMonth: recent * 5 };
102}
103
104export interface MaintainForecast {
105 weeklyAvg: number; // mean opened/week over the window

Callers 4

index.tsFile · 0.85
gatherDashboardDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected