<commit_before>'use strict';

var debug = require('debug-ext')('health')

  , now = require('microtime-x');

debug.color = 5;

module.exports = exports = function () {
	debug("%sMB", (process.memoryUsage().rss / 1048576).toFixed(3));
};
exports();

setInterval(function () {
	console.log('');
	debug("%s %s %sMB", (new Date()).toISOString(), now(),
		(process.memoryUsage().rss / 1048576).toFixed(3));
}, 1000 * 60);
<commit_msg>Improve debug-time service<commit_after>'use strict';

var ensureString = require('es5-ext/object/validate-stringifiable-value')
  , getDebug     = require('debug-ext')
  , now          = require('microtime-x');

module.exports = function (ns) {
	var debug = getDebug('health:' + ensureString(ns));

	debug.color = 5;

	debug("%sMB", (process.memoryUsage().rss / 1048576).toFixed(3));

	setInterval(function () {
		debug("%s %s %sMB", (new Date()).toISOString(), now(),
			(process.memoryUsage().rss / 1048576).toFixed(3) + "\n");
	}, 1000 * 60);
};

{'fraction_non_alphanumeric': 0.21654749744637386, 'fraction_numerical': 0.04800817160367722, 'mean_word_length': 4.6, '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': '3371045', 'n_tokens_mistral': 378, 'n_tokens_neox': 332, 'n_words': 63}