etishor / Metrics.NET

The Metrics.NET library provides a way of instrumenting applications with custom metrics (timers, histograms, counters etc) that can be reported in various ways and can provide insights on what is happening inside a running application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Q - Is the returned instance of Metric.Timer(...) thread safe?

shay1e opened this issue · comments

Is it safe to have a static Metric.Timer(...) field inside a class? Or should each class instance have it's own Timer? I'm asking because In my application there are many instances of the same class (say, User class) and I would like to avoid the overhead of initializing a Timer for each one, if possible.