Add lengthBucket

This commit is contained in:
Sidharth Vinod
2023-06-09 23:29:06 +05:30
parent ca5610ab79
commit dc735e2d08
+21 -1
View File
@@ -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 => {