internal int StoreValue(string message, TimerTraceList traces) { DateTime now = DateTime.Now; if (resolution.Ticks != 0) { if (now - lastValueTime < resolution) { return(-1); } } var val = new CounterValue(count, totalCount, now, message, traces); if (storeValues) { values.Add(val); } if (handlers.Count > 0) { foreach (var h in handlers) { h.ConsumeValue(this, val); } } return(values.Count - 1); }
internal CounterValue(int value, int totalCount, DateTime timestamp, string message, TimerTraceList traces) { this.value = value; this.timestamp = timestamp; this.totalCount = totalCount; this.message = message; this.traces = traces; this.threadId = System.Threading.Thread.CurrentThread.ManagedThreadId; }
internal CounterValue(int value, int totalCount, DateTime timestamp) { this.value = value; this.timestamp = timestamp; this.totalCount = totalCount; this.message = null; traces = null; threadId = 0; }
internal TimeCounter(TimerCounter counter) { this.counter = counter; if (counter.Enabled) { traceList = new TimerTraceList(); } Begin(); }
internal CounterValue(int value, int totalCount, DateTime timestamp, string message, TimerTraceList traces, IDictionary <string, object> metadata) { Value = value; TimeStamp = timestamp; TotalCount = totalCount; Message = message; this.traces = traces; ThreadId = System.Threading.Thread.CurrentThread.ManagedThreadId; this.metadata = metadata; }
internal CounterValue(int value, int totalCount, int change, DateTime timestamp, string message, TimerTraceList traces, IDictionary <string, string> metadata) { this.value = value; this.timestamp = timestamp; this.totalCount = totalCount; this.message = message; this.traces = traces; this.change = change; this.threadId = System.Threading.Thread.CurrentThread.ManagedThreadId; this.metadata = metadata; }
internal CounterValue(int value, int totalCount, DateTime timestamp, IDictionary <string, string> metadata) { this.value = value; this.timestamp = timestamp; this.totalCount = totalCount; this.message = null; traces = null; threadId = 0; change = 0; this.metadata = metadata; }
internal int StoreValue(string message, TimerTraceList traces) { DateTime now = DateTime.Now; if (resolution.Ticks != 0) { if (now - lastValueTime < resolution) { return(-1); } } values.Add(new CounterValue(count, totalCount, now, message, traces)); return(values.Count - 1); }
internal TimeCounter(TimerCounter counter, T metadata, CancellationToken cancellationToken) { this.counter = counter; this.metadata = metadata; if (counter.Enabled || metadata != null) { // Store metadata in the traces list. The corresponding CounterValue will get whatever // metadata is assigned there traceList = new TimerTraceList(); traceList.Metadata = metadata?.Properties; } this.cancellationToken = cancellationToken; Begin(); }
internal int StoreValue (string message, TimerTraceList traces) { DateTime now = DateTime.Now; if (resolution.Ticks != 0) { if (now - lastValueTime < resolution) return -1; } var val = new CounterValue (count, totalCount, now, message, traces); if (storeValues) values.Add (val); if (handlers.Count > 0) { foreach (var h in handlers) h.ConsumeValue (this, val); } return values.Count - 1; }
internal TimeCounter (TimerCounter counter) { this.counter = counter; traceList = new TimerTraceList (); Begin (); }
internal CounterValue (int value, int totalCount, int change, DateTime timestamp, string message, TimerTraceList traces, IDictionary<string, string> metadata) { this.value = value; this.timestamp = timestamp; this.totalCount = totalCount; this.message = message; this.traces = traces; this.change = change; this.threadId = System.Threading.Thread.CurrentThread.ManagedThreadId; this.metadata = metadata; }
internal int StoreValue (string message, TimerTraceList traces) { DateTime now = DateTime.Now; if (resolution.Ticks != 0) { if (now - lastValueTime < resolution) return -1; } values.Add (new CounterValue (count, totalCount, now, message, traces)); return values.Count - 1; }
internal TimeCounter(TimerCounter counter) { this.counter = counter; traceList = new TimerTraceList(); Begin(); }
internal CounterValue (int value, int totalCount, DateTime timestamp) { this.value = value; this.timestamp = timestamp; this.totalCount = totalCount; this.message = null; traces = null; threadId = 0; }
internal CounterValue (int value, int totalCount, DateTime timestamp, string message, TimerTraceList traces) { this.value = value; this.timestamp = timestamp; this.totalCount = totalCount; this.message = message; this.traces = traces; this.threadId = System.Threading.Thread.CurrentThread.ManagedThreadId; }
internal CounterValue (int value, int totalCount, DateTime timestamp, IDictionary<string, string> metadata) { this.value = value; this.timestamp = timestamp; this.totalCount = totalCount; this.message = null; traces = null; threadId = 0; change = 0; this.metadata = metadata; }