Example #1
0
        private static void Write(IAppMetrics metrics, string owningTypeName, string methodName, long duration, bool success = true)
        {
            var    eventName = $"{owningTypeName}_{methodName}".SafeString();
            double elapsed   = (double)duration / AspectFactory.TickPerMicrosecond;

            metrics.DecGauge($"{eventName}_gauge");
            metrics.IncCounter($"{eventName}_count", success);
            metrics.IncHistogram($"{eventName}_elapsed_microseconds", elapsed, success);
        }
Example #2
0
 private static void Write(IAppMetrics metrics, string eventName, long duration, bool success = true)
 {
     metrics.IncCounter($"{eventName}_count", success);
     metrics.IncHistogram($"{eventName}_elapsed_ms", duration, success);
 }