<commit_before>'use strict';

// 3rd-party modules

var webdriver = require('selenium-webdriver');

var By = webdriver.By;

// our modules

var makeDriver = require('./../driver');

// this module

module.exports = function (browser) {
  return function (done) {
    var driver = makeDriver(browser);
    var score = { actual: 0 };
    var element;

    driver.get('http://browserbench.org/JetStream/');
    driver.wait(webdriver.until.elementLocated(By.css('#status > a')), 10e3);

    element = driver.findElement(By.css('#status > a'));
    element.click();

    element = driver.findElement(By.css('#status'));
    driver.wait(webdriver.until.elementTextContains(element, 'Running iteration 3 of 3'), 120e3);

    element = driver.findElement(By.css('#result-summary'));
    driver.wait(webdriver.until.elementTextContains(element, 'Score'), 120e3);

    element = driver.findElement(By.css('#result-summary .score'));

    element.getText().then(function (text) {
      score.actual = parseFloat(text, 10);
      console.log(browser, 'jetstream', score);
      driver.quit();
      done();
    });

  };
};<commit_msg>improve the JetStream runner<commit_after>'use strict';

// 3rd-party modules

var webdriver = require('selenium-webdriver');

var By = webdriver.By;

// our modules

var makeDriver = require('./../driver');

// this module

module.exports = function (browser) {
  return function (done) {
    var driver = makeDriver(browser);
    var score = { actual: 0 };
    var element;

    driver.get('http://browserbench.org/JetStream/');
    driver.sleep(2e3);
    driver.wait(webdriver.until.elementLocated(By.css('#status > a')), 10e3);

    element = driver.findElement(By.css('#status > a'));
    element.click();

    element = driver.findElement(By.css('#status'));
    driver.wait(webdriver.until.elementTextContains(element, 'Running iteration 1 of 3'), 120e3);
    driver.wait(webdriver.until.elementTextContains(element, 'Running iteration 2 of 3'), 120e3);
    driver.wait(webdriver.until.elementTextContains(element, 'Running iteration 3 of 3'), 120e3);

    element = driver.findElement(By.css('#result-summary'));
    driver.wait(webdriver.until.elementTextContains(element, 'Score'), 120e3);

    element = driver.findElement(By.css('#result-summary .score'));

    element.getText().then(function (text) {
      score.actual = parseFloat(text, 10);
      console.log(browser, 'jetstream', score);
      driver.quit();
      done();
    });

  };
};
{'fraction_non_alphanumeric': 0.16612903225806452, 'fraction_numerical': 0.01935483870967742, 'mean_word_length': 3.864705882352941, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4524430', 'n_tokens_mistral': 805, 'n_tokens_neox': 744, 'n_words': 152}