import { electronRendererTelemetry } from 'electron-telemetry' ; function trackProcessStatistics ( ) { setInterval ( ( ) => { try { electronRendererTelemetry . trackCustomEvent ( { name : 'heapStatistics' , payload : process . getHeapStatistics ( ) , } ) ; electronRendererTelemetry . trackCustomEvent ( { name : 'cpuUsage' , payload : process . getCPUUsage ( ) , } ) ; electronRendererTelemetry . trackCustomEvent ( { name : 'runningSince' , payload : performance . now ( ) , } ) ; } catch ( error ) { console . error ( error ) ; } } , 60 * 1000 ) ; } trackProcessStatistics ( ) ; export function trackEvent ( name ) { if ( name . match ( /^@@redux/ ) ) { return ; } const blacklist = [ 'CONNECTION_SET_HEALTH' ] ; if ( blacklist . indexOf ( name ) === - 1 ) { electronRendererTelemetry . trackEvent ( name ) ; } }