<commit_before>var Io = require('legion-io');

module.exports = function(concurrency, testcase) {
  testcase = Io.of().chain(testcase);

  return Io.get().chain(function(receiver) {
    var user_number = 0;
    var results = [];

    for( user_number = 0; user_number < concurrency; user_number++ )
      results.push(testcase.run(receiver));

    return Promise.all(results);
  });
};
<commit_msg>Adding some extra-defensive programming to try to catch more errors.<commit_after>var Io = require('legion-io');
var reportingErrors = require('./reportingErrors');

module.exports = function(concurrency, testcase) {
  return reportingErrors(Io.get().chain(function(receiver) {
    var user_number = 0;
    var results = [];
    testcase = Io.of().chain(testcase);

    for( user_number = 0; user_number < concurrency; user_number++ )
      results.push(testcase.run(receiver));

    return Promise.all(results);
  }));
};


{'fraction_non_alphanumeric': 0.1475054229934924, 'fraction_numerical': 0.004338394793926247, 'mean_word_length': 4.244318181818182, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7212016', 'n_tokens_mistral': 294, 'n_tokens_neox': 282, 'n_words': 60}