Skip to content
Yorick Smeets edited this page Jun 9, 2020 · 4 revisions

The Metrics.NET library provides the following out of the box implementations for reporting or visualizing metrics:

###Console Report Schedule a console report to be run and displayed every 10 seconds:

Metric.Config.WithReporting(report => report
    .WithConsoleReport(TimeSpan.FromSeconds(10)));

###CSV File Report Schedule a line to be appended for each metric to a csv file:

Metric.Config.WithReporting(report => report
    .WithCSVReports(@"c:\temp\reports\", TimeSpan.FromSeconds(10)));

###Human Readable text file Schedule a human readable text version of the current metrics to be written to a file every 1 minute:

Metric.Config.WithReporting(report => report
    .WithTextFileReport(@"C:\temp\reports\metrics.txt", TimeSpan.FromMinutes(1)));