const { app, ipcMain } = require('electron');

class Observability {
  constructor(desktop) {
    this.desktop = desktop;
    this.log = this.desktop.log;

    ipcMain.on('metrics', this.printMetrics.bind(this));
  }

  printMetrics = () => {
    this.log.info('[APP METRICS]', app.getAppMetrics());
    // this.log.info('[GPU METRICS]', app.getGpuInfo('complete'));
  }
}

module.exports = Observability;
