<commit_before>(function() {
  var CPUChartWidget = function(widget) {
    BaseChartWidget.call(this, widget);
  };
  CPUChartWidget.prototype = Object.create(BaseChartWidget.prototype);

  CPUChartWidget.prototype.getTitle = function() {
    return "CPU Usage";
  };

  CPUChartWidget.prototype.getWidthClass = function() {
    return "three";
  };

  CPUChartWidget.prototype.getColors = function() {
    return ['#4CAF50'];
  },

  CPUChartWidget.prototype.getFillColors = function() {
    return ['rgba(76,175,80,0.05)'];
  };

  CPUChartWidget.prototype.getLabels = function() {
    return ['CPU Usage'];
  };

  CPUChartWidget.prototype.getSuffix = function() {
    return "%";
  };

  CPUChartWidget.prototype.getPointsFromHistory = function(history) {
    var dataPoints = [];
    var labels = [];

    history.cpu.forEach(function(data, index) {
      this.numPoints++;

      dataPoints.push(Math.floor(data.cpu));
      labels.push(
        index % 5 === 0
          ? moment(data.timestamp).format('h:mm:ss')
          : ''
      );
    }, this);

    return {
      values: [dataPoints],
      labels: labels,
    };
  };

  CPUChartWidget.prototype.getValuesFromData = function(data) {
    if (!data.cpu) {
      return;
    }

    return [
      Math.floor(data.cpu.cpu),
    ];
  };

  CPUChartWidget.prototype.getLabelFromData = function(data) {
    return moment(data.cpu.timestamp).format('h:mm:ss');
  };

  window.CPUChartWidget = CPUChartWidget;
})();<commit_msg>Dont floor cpu usage in chart<commit_after>(function() {
  var CPUChartWidget = function(widget) {
    BaseChartWidget.call(this, widget);
  };
  CPUChartWidget.prototype = Object.create(BaseChartWidget.prototype);

  CPUChartWidget.prototype.getTitle = function() {
    return "CPU Usage";
  };

  CPUChartWidget.prototype.getWidthClass = function() {
    return "three";
  };

  CPUChartWidget.prototype.getColors = function() {
    return ['#4CAF50'];
  },

  CPUChartWidget.prototype.getFillColors = function() {
    return ['rgba(76,175,80,0.05)'];
  };

  CPUChartWidget.prototype.getLabels = function() {
    return ['CPU Usage'];
  };

  CPUChartWidget.prototype.getSuffix = function() {
    return "%";
  };

  CPUChartWidget.prototype.getPointsFromHistory = function(history) {
    var dataPoints = [];
    var labels = [];

    history.cpu.forEach(function(data, index) {
      this.numPoints++;

      dataPoints.push(data.cpu);
      labels.push(
        index % 5 === 0
          ? moment(data.timestamp).format('h:mm:ss')
          : ''
      );
    }, this);

    return {
      values: [dataPoints],
      labels: labels,
    };
  };

  CPUChartWidget.prototype.getValuesFromData = function(data) {
    if (!data.cpu) {
      return;
    }

    return [data.cpu.cpu];
  };

  CPUChartWidget.prototype.getLabelFromData = function(data) {
    return moment(data.cpu.timestamp).format('h:mm:ss');
  };

  window.CPUChartWidget = CPUChartWidget;
})();
{'fraction_non_alphanumeric': 0.1515768056968464, 'fraction_numerical': 0.01017293997965412, 'mean_word_length': 3.085872576177285, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2242349', 'n_tokens_mistral': 960, 'n_tokens_neox': 915, 'n_words': 139}