<commit_before>const Promise = require('bluebird');
const times = require('./times');
const page = require('./page');
const zip = require('./zip');

function runner (opts) {
  const iterator = (url) => page(Object.assign({}, opts, { url: url }));
  const concurrency = opts.parallel ? opts.url.length : 1;

  return Promise.map(times(opts.count), () => {
    return Promise.map(opts.url, iterator, { concurrency: concurrency });
  }, { concurrency: 1 })
  .then((results) => zip(results));<commit_msg>Minor refactor of function call<commit_after>const Promise = require('bluebird');
const times = require('./times');
const page = require('./page');
const zip = require('./zip');

function runner (opts) {
  const iterator = (url) => page(Object.assign({}, opts, { url: url }));
  const concurrency = opts.parallel ? opts.url.length : 1;

  return Promise.map(times(opts.count), () => {
    return Promise.map(opts.url, iterator, { concurrency: concurrency });
  }, { concurrency: 1 })
  .then(zip);
{'fraction_non_alphanumeric': 0.1903807615230461, 'fraction_numerical': 0.004008016032064128, 'mean_word_length': 4.519337016574585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '4388225', 'n_tokens_mistral': 300, 'n_tokens_neox': 295, 'n_words': 78}