<commit_before>/*
 *    Copyright (C) 2017    IC Manage Inc.
 *
 *    See the file 'COPYING' for license information.
 */
const r = require('rethinkdb');
const conf = require('../vcncSampler.conf');
//
const config = require('../../../vcnc-core/src/lib/configuration.js');
//
const table = conf.Table();
//
let cnxtn = null;

//
//  A watchdog barks (to console) if there have been no messages for one
//  minute.  The metaphor is: the watchdog barks if he hasn't been
//  fed for more than one minute.
//
let watchdogFed = undefined;
function feedWatchdog() {
  console.log('INFO: feeding sampler watchdog')
  watchdogFed = true;
}
setInterval(
  () => {
    if (watchdogFed !== undefined || !watchdogFed) {
    }
    watchdogFed = false;
  },
  60*1000);
//  End of watchdog code

class RethinkdbSampler {
  constructor(dt) {
    this.period = parseInt(dt, 10);
    this.timespanSec = conf.MaxEntries() * (dt / 1000.0);<commit_msg>vcnc-sampler: remove a noise debug message<commit_after>/*
 *    Copyright (C) 2017    IC Manage Inc.
 *
 *    See the file 'COPYING' for license information.
 */
const r = require('rethinkdb');
const conf = require('../vcncSampler.conf');
//
const config = require('../../../vcnc-core/src/lib/configuration.js');
//
const table = conf.Table();
//
let cnxtn = null;

//
//  A watchdog barks (to console) if there have been no messages for one
//  minute.  The metaphor is: the watchdog barks if he hasn't been
//  fed for more than one minute.
//
let watchdogFed = undefined;
function feedWatchdog() {
  watchdogFed = true;
}
setInterval(
  () => {
    if (watchdogFed !== undefined || !watchdogFed) {
    }
    watchdogFed = false;
  },
  60*1000);
//  End of watchdog code

class RethinkdbSampler {
  constructor(dt) {
    this.period = parseInt(dt, 10);
    this.timespanSec = conf.MaxEntries() * (dt / 1000.0);
{'fraction_non_alphanumeric': 0.1505143475906876, 'fraction_numerical': 0.018408229561451002, 'mean_word_length': 3.034934497816594, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5445305', 'n_tokens_mistral': 653, 'n_tokens_neox': 610, 'n_words': 184}