<commit_before>'use strict';

var filterInternals = require('./lib/filter-internals')
  , traceUtil       = require('./lib/trace-util')
  , getConverter    = require('./lib/get-converter')
  , resolveSymbols  = require('./lib/resolve-symbols')
  , xtend           = require('xtend')
  , inherits        = require('inherits')
  , EventEmitter    = require('events')

function CpuProfilifier() {
  if (!(this instanceof CpuProfilifier)) return new CpuProfilifier();
  EventEmitter.call(this);
}

inherits(CpuProfilifier, EventEmitter);

var proto = CpuProfilifier.prototype;
module.exports = CpuProfilifier;

proto.convert = function convert(trace, opts) {
  opts = opts || {};
  this._opts = xtend({ v8gc: true }, opts);

  this._trace = trace;
  this._traceLen = trace.length;

  if (!this._traceLen) {
    this.emit('warn', 'Trace was empty, quitting');<commit_msg>test: passing tests in 0.8<commit_after>'use strict';

var filterInternals = require('./lib/filter-internals')
  , traceUtil       = require('./lib/trace-util')
  , getConverter    = require('./lib/get-converter')
  , resolveSymbols  = require('./lib/resolve-symbols')
  , xtend           = require('xtend')
  , inherits        = require('inherits')
  , EventEmitter    = require('events').EventEmitter

function CpuProfilifier() {
  if (!(this instanceof CpuProfilifier)) return new CpuProfilifier();
  EventEmitter.call(this);
}

inherits(CpuProfilifier, EventEmitter);

var proto = CpuProfilifier.prototype;
module.exports = CpuProfilifier;

proto.convert = function convert(trace, opts) {
  opts = opts || {};
  this._opts = xtend({ v8gc: true }, opts);

  this._trace = trace;
  this._traceLen = trace.length;

  if (!this._traceLen) {
    this.emit('warn', 'Trace was empty, quitting');
{'fraction_non_alphanumeric': 0.15187713310580206, 'fraction_numerical': 0.0022753128555176336, 'mean_word_length': 3.9271708683473388, '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': '2024721', 'n_tokens_mistral': 563, 'n_tokens_neox': 564, 'n_words': 115}