translateMetricTitle(type, pid) {
    if (this.mainId === pid) {
      return 'Application main thread';
    }
    if (this.thisPid === pid) {
      return 'Task manager';
    }
    const windows = BrowserWindow.getAllWindows();
    for (let i = 0; i < windows.length; i++) {
      if (windows[i].webContents.getOSProcessId() === pid) {
        const title = windows[i].getTitle();
        if (title) {
          return title;
        }
      }
    }
    switch (type) {
      case 'Tab': return 'Application window';
      case 'Browser': return 'Application';
      default: return type;
    }
  }
/**
   * Translates `type` property of the metric to a title to display
   * @param {String} type Metric type value
   * @param {Number} pid OS process id
   * @return {String} Title related to the type.
   */
Translates `type` property of the metric to a title to display
@param {String} type Metric type value
@param {Number} pid OS process id
@return {String} Title related to the type.
Translates ` type ` property of the metric to a title to display @param { String } type Metric type value @param { Number } pid OS process id @return { String } Title related to the type .
translateMetricTitle(type, pid) {
    if (this.mainId === pid) {
      return 'Application main thread';
    }
    if (this.thisPid === pid) {
      return 'Task manager';
    }
    const windows = BrowserWindow.getAllWindows();
    for (let i = 0; i < windows.length; i++) {
      if (windows[i].webContents.getOSProcessId() === pid) {
        const title = windows[i].getTitle();
        if (title) {
          return title;
        }
      }
    }
    switch (type) {
      case 'Tab': return 'Application window';
      case 'Browser': return 'Application';
      default: return type;
    }
  }
translateMetricTitle ( type , pid ) { if ( this . mainId === pid ) { return 'Application main thread' ; } if ( this . thisPid === pid ) { return 'Task manager' ; } const windows = BrowserWindow . getAllWindows ( ) ; for ( let i = 0 ; i < windows . length ; i ++ ) { if ( windows [ i ] . webContents . getOSProcessId ( ) === pid ) { const title = windows [ i ] . getTitle ( ) ; if ( title ) { return title ; } } } switch ( type ) { case 'Tab' : return 'Application window' ; case 'Browser' : return 'Application' ; default : return type ; } }
Translates `type` property of the metric to a title to display
 @param {String} type Metric type value
 @param {Number} pid OS process id
 @return {String} Title related to the type.
Translates ` type ` property of the metric to a title to display @param { String } type Metric type value @param { Number } pid OS process id @return { String } Title related to the type .