<commit_before>import Module from 'Parser/Core/Module';

import HealingValue from './HealingValue';

class HealingDone extends Module {
  _total = new HealingValue(); // consider this "protected", so don't change this from other modules. If you want special behavior you must add that code to an extended version of this module.
  get total() {
    return this._total;
  }
  bySecond = {};

  on_byPlayer_heal(event) {
    this._addHealing(event.timestamp, event.amount, event.absorbed, event.overheal);
  }
  on_byPlayer_absorbed(event) {
    this._addHealing(event.timestamp, 0, event.amount, 0);
  }
  on_byPlayer_removebuff(event) {
    if (event.absorb) {
      this._addHealing(event.timestamp, 0, 0, event.absorb);
    }
  }

  _addHealing(timestamp, amount = 0, absorbed = 0, overheal = 0) {
    this._total = this._total.add(amount, absorbed, overheal);
    // TODO: byAbility
    const secondsIntoFight = Math.floor((timestamp - this.owner.fight.start_time) / 1000);
    this.bySecond[secondsIntoFight] = (this.bySecond[secondsIntoFight] || new HealingValue()).add(amount, absorbed, overheal);
  }
  _subtractHealing(timestamp, amount = 0, absorbed = 0, overheal = 0) {
    return this._addHealing(timestamp, -amount, -absorbed, -overheal);<commit_msg>Include pet healing in HealingDone<commit_after>import Module from 'Parser/Core/Module';

import HealingValue from './HealingValue';

class HealingDone extends Module {
  _total = new HealingValue(); // consider this "protected", so don't change this from other modules. If you want special behavior you must add that code to an extended version of this module.
  get total() {
    return this._total;
  }
  bySecond = {};

  on_heal(event) {
    if (this.owner.byPlayer(event) || this.owner.byPlayerPet(event)) {
      this._addHealing(event.timestamp, event.amount, event.absorbed, event.overheal);
    }
  }
  on_absorbed(event) {
    if (this.owner.byPlayer(event) || this.owner.byPlayerPet(event)) {
      this._addHealing(event.timestamp, 0, event.amount, 0);
    }
  }
  on_removebuff(event) {
    if (this.owner.byPlayer(event) || this.owner.byPlayerPet(event)) {
      if (event.absorb) {
        this._addHealing(event.timestamp, 0, 0, event.absorb);
      }
    }
  }

  _addHealing(timestamp, amount = 0, absorbed = 0, overheal = 0) {
    this._total = this._total.add(amount, absorbed, overheal);
    // TODO: byAbility
    const secondsIntoFight = Math.floor((timestamp - this.owner.fight.start_time) / 1000);
    this.bySecond[secondsIntoFight] = (this.bySecond[secondsIntoFight] || new HealingValue()).add(amount, absorbed, overheal);
  }
  _subtractHealing(timestamp, amount = 0, absorbed = 0, overheal = 0) {
    return this._addHealing(timestamp, -amount, -absorbed, -overheal);
{'fraction_non_alphanumeric': 0.12685755708590069, 'fraction_numerical': 0.010148604566872055, 'mean_word_length': 3.9373881932021466, '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': '5986626', 'n_tokens_mistral': 930, 'n_tokens_neox': 887, 'n_words': 212}