diff --git a/src/lib/util/stats.ts b/src/lib/util/stats.ts index 48f082d2..688b35ed 100644 --- a/src/lib/util/stats.ts +++ b/src/lib/util/stats.ts @@ -60,7 +60,27 @@ export const saveStatistics = (graph: string): void => { return; } const length = countLines(graph); - logEvent('render', { graphType, length }); + const lengthBucket = + length < 10 + ? '0-10' + : length < 25 + ? '10-25' + : length < 50 + ? '25-50' + : length < 100 + ? '50-100' + : length < 200 + ? '100-200' + : length < 500 + ? '200-500' + : length < 700 + ? '500-700' + : length < 1000 + ? '700-1000' + : length < 1500 + ? '1000-1500' + : '1500+'; + logEvent('render', { graphType, length, lengthBucket }); }; const minutesToMilliSeconds = (minutes: number): number => {