<commit_before>﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

namespace StatsDPerfMon
{
	public class PerfCounterService : ScheduledServiceBase
	{
		private readonly Lazy<Dictionary<string, PerformanceCounter>> counters;
		private readonly IStatsD statsD;

		public PerfCounterService(Func<IEnumerable<CounterDefinition>> getDefinitions, string statsDHost, int statsDPort = 8125, string statsPrefix = null)
		{
			defaultTickTimeSpan = TimeSpan.FromSeconds(5);
			initialDelay = TimeSpan.FromSeconds(10);

			statsPrefix = statsPrefix ?? string.Format("monitor.{0}.", Environment.MachineName);

			statsD = new StatsD(
				host: statsDHost,
				port: statsDPort,
				prefix: statsPrefix
				);
<commit_msg>Change polling interval to match graphite (10 sec)<commit_after>﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

namespace StatsDPerfMon
{
	public class PerfCounterService : ScheduledServiceBase
	{
		private readonly Lazy<Dictionary<string, PerformanceCounter>> counters;
		private readonly IStatsD statsD;

		public PerfCounterService(Func<IEnumerable<CounterDefinition>> getDefinitions, string statsDHost, int statsDPort = 8125, string statsPrefix = null)
		{
			defaultTickTimeSpan = TimeSpan.FromSeconds(10);
			initialDelay = TimeSpan.FromSeconds(10);

			statsPrefix = statsPrefix ?? string.Format("monitor.{0}.", Environment.MachineName);

			statsD = new StatsD(
				host: statsDHost,
				port: statsDPort,
				prefix: statsPrefix
				);

{'fraction_non_alphanumeric': 0.08926261319534282, 'fraction_numerical': 0.012289780077619664, 'mean_word_length': 5.5, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6326056', 'n_tokens_mistral': 506, 'n_tokens_neox': 434, 'n_words': 109}