/// <summary> /// Polls the sampler's counters and writes the results to the writer object. /// </summary> private void Poll() { var sampleResults = sampler.SampleAll(); var compressedTable = CounterSamplerResultHelper.CompressTable(sampleResults); options.Writer.Write(compressedTable); }
/// <summary> /// Polls the sampler's counters and writes the results to the writer object. /// </summary> /// <param name="stateInfo"></param> private void PollCounters(object stateInfo) { tryStartIndividualPoll(CounterSampler.InProgressLock, PollWaitTimeout, () => { var sampleResults = sampler.SampleAll(); OutputSerializer.Write(sampleResults, false); }); }
/// <summary> /// Polls the sampler's counters and writes the results to the writer object. /// </summary> /// <param name="stateInfo"></param> private void Poll(object stateInfo) { var sampleResults = sampler.SampleAll(); lock (WriteLock) { options.Writer.Write(sampleResults); } }