<commit_before>var spawn = require('child_process').spawn
var path = require('path')

var CHROMEDRIVER = path.join(
  __dirname, '..', 'node_modules', '.bin', 'chromedriver'
)

var chromedriver = spawn(CHROMEDRIVER, ['--url-base=/wd/hub'])

var webdriver = module.exports = require('webdriverio')
  .remote({
    host: 'localhost',
    port: 9515,
    desiredCapabilities: {
      browserName: 'chrome'
    }
  })
  .init()
  .timeouts('script', 1000)
  .timeouts('implicit', 1000)

require('tape').onFinish(cleanup)
process
  .on('SIGTERM', cleanup)
  .on('SIGQUIT', cleanup)
  .on('SIGINT', cleanup)
  .on('uncaughtException', cleanup)

function cleanup () {
  webdriver.end()
  chromedriver.kill()
}<commit_msg>Send chromedriver SIGKILL<commit_after>var spawn = require('child_process').spawn
var path = require('path')

var CHROMEDRIVER = path.join(
  __dirname, '..', 'node_modules', '.bin', 'chromedriver'
)

var chromedriver = spawn(CHROMEDRIVER, ['--url-base=/wd/hub'])

var webdriver = module.exports = require('webdriverio')
  .remote({
    host: 'localhost',
    port: 9515,
    desiredCapabilities: {
      browserName: 'chrome'
    }
  })
  .init()
  .timeouts('script', 1000)
  .timeouts('implicit', 1000)

require('tape').onFinish(cleanup)
process
  .on('SIGTERM', cleanup)
  .on('SIGQUIT', cleanup)
  .on('SIGINT', cleanup)
  .on('uncaughtException', cleanup)

function cleanup () {
  webdriver.end()
  chromedriver.kill('SIGKILL')
}
{'fraction_non_alphanumeric': 0.1766735679779158, 'fraction_numerical': 0.016563146997929608, 'mean_word_length': 4.350553505535055, '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': '2083072', 'n_tokens_mistral': 539, 'n_tokens_neox': 511, 'n_words': 98}