<commit_before>import { benchmark } from './benchmark';
import { rnd0Z } from '../src/random';

describe('Benchmark:', function () {
  this.timeout(10 * 1e3);

  describe('indexOf', function () {
    it('10', function (done) {
      const r = `${rnd0Z(9)}-`.split('');
      benchmark('array indexOf 10', () => r.indexOf('-'), done);
    });

    it('100', function (done) {
      const r = `${rnd0Z(99)}-`.split('');
      benchmark('array indexOf 100', () => r.indexOf('-'), done);
    });

    it('1000', function (done) {
      const r = `${rnd0Z(999)}-`.split('');
      benchmark('array indexOf 1000', () => r.indexOf('-'), done);
    });

    it('10000', function (done) {
      const r = `${rnd0Z(9999)}-`.split('');
      benchmark('array indexOf 10000', () => r.indexOf('-'), done);
    });<commit_msg>Refactoring<commit_after>import { benchmark } from './benchmark';
import { rnd0Z } from '../src/random';

describe('Benchmark:', function () {
  this.timeout(10 * 1e3);

  describe('indexOf', function () {
    it('10', function (done) {
      const r = `${rnd0Z(9)}-`.split('');
      benchmark('array indexOf 10', () => r.indexOf('-'), done);
    });

    it('100', function (done) {
      const r = `${rnd0Z(99)}-`.split('');
      benchmark('array indexOf 100', () => r.indexOf('-'), done);
    });

    it('1000', function (done) {
      const r = `${rnd0Z(999)}-`.split('');
      benchmark('array indexOf 1000', () => r.indexOf('-'), done);
    });
{'fraction_non_alphanumeric': 0.25375170532060026, 'fraction_numerical': 0.0538881309686221, 'mean_word_length': 3.1207865168539324, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '4694559', 'n_tokens_mistral': 558, 'n_tokens_neox': 501, 'n_words': 105}