MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / newUsersFrom

Function newUsersFrom

telemetry-dashboard/src/api.ts:401–404  ·  view source on GitHub ↗

The first day whose cohort is of new users; '' when the records have no stated beginning.

(env: Env)

Source from the content-addressed store, hash-verified

399const NEW_USER_WARMUP_DAYS = 30;
400/** The first day whose cohort is of new users; '' when the records have no stated beginning. */
401function newUsersFrom(env: Env): string {
402 const raw = (env as { USER_RECORDS_FROM?: unknown }).USER_RECORDS_FROM;
403 return typeof raw === 'string' && /^\d{4}-\d{2}-\d{2}$/.test(raw) ? addDays(raw, NEW_USER_WARMUP_DAYS) : '';
404}
405/**
406 * A machine with an installed day counts as a user unless it was only ever seen in
407 * CI, or is a container seen on a single day. The same rule, in the same words, as

Callers 4

summaryFunction · 0.85
timeseriesFunction · 0.85
activationFunction · 0.85
retentionFunction · 0.85

Calls 1

addDaysFunction · 0.70

Tested by

no test coverage detected