<commit_before>var async = require('async');
var TargetState = require('./target_state');
var targetCheck = require('./target_check');

var Defaults = {
  Interval: 30000,
  Timeout: 10000,
  HealthyThreshold: 2,
  UnhealthyThreshold: 5,
  MaxParallel: 5,
  AssumeHealthy: true
};

var MonitorService = module.exports = function(serviceRegistryClient, opts) {
  var self = this;

  if (!opts) {
    opts = {};
  }

  if (!serviceRegistryClient) {
    throw new Error('ServiceRegistryClient must be supplied');
  }
  this.serviceRegistryClient = serviceRegistryClient;

  Object.keys(Defaults).forEach(function(k) {
    self[k] = Defaults[k];
    if (opts.hasOwnProperty(k)) {
      self[k] = opts[k];
    }
  });

  if (!this.log) {
    this.log = console;
  }

  this.state = {}; // { <targetUrl>: TargetState }
  this.disabled = (opts.disabled === true);<commit_msg>Switched default option for AssumeHealthy to false<commit_after>var async = require('async');
var TargetState = require('./target_state');
var targetCheck = require('./target_check');

var Defaults = {
  Interval: 30000,
  Timeout: 10000,
  HealthyThreshold: 2,
  UnhealthyThreshold: 5,
  MaxParallel: 5,
  AssumeHealthy: false
};

var MonitorService = module.exports = function(serviceRegistryClient, opts) {
  var self = this;

  if (!opts) {
    opts = {};
  }

  if (!serviceRegistryClient) {
    throw new Error('ServiceRegistryClient must be supplied');
  }
  this.serviceRegistryClient = serviceRegistryClient;

  Object.keys(Defaults).forEach(function(k) {
    self[k] = Defaults[k];
    if (opts.hasOwnProperty(k)) {
      self[k] = opts[k];
    }
  });

  if (!this.log) {
    this.log = console;
  }

  this.state = {}; // { <targetUrl>: TargetState }
  this.disabled = (opts.disabled === true);
{'fraction_non_alphanumeric': 0.14768883878241262, 'fraction_numerical': 0.014656144306651634, 'mean_word_length': 3.784366576819407, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4898559', 'n_tokens_mistral': 596, 'n_tokens_neox': 557, 'n_words': 127}