コード例 #1
0
        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);
        }
コード例 #2
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;
 }
コード例 #3
0
 internal CounterValue(int value, int totalCount, DateTime timestamp)
 {
     this.value      = value;
     this.timestamp  = timestamp;
     this.totalCount = totalCount;
     this.message    = null;
     traces          = null;
     threadId        = 0;
 }
コード例 #4
0
ファイル: TimeCounter.cs プロジェクト: wjohnke/CSS18
 internal TimeCounter(TimerCounter counter)
 {
     this.counter = counter;
     if (counter.Enabled)
     {
         traceList = new TimerTraceList();
     }
     Begin();
 }
コード例 #5
0
ファイル: Counter.cs プロジェクト: Zyx-A/monodevelop
 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;
 }
コード例 #6
0
ファイル: Counter.cs プロジェクト: sim756/monodevelop
 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;
 }
コード例 #7
0
ファイル: Counter.cs プロジェクト: sim756/monodevelop
 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;
 }
コード例 #8
0
        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);
        }
コード例 #9
0
ファイル: TimeCounter.cs プロジェクト: sim756/monodevelop
 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();
 }
コード例 #10
0
ファイル: Counter.cs プロジェクト: Kalnor/monodevelop
		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;
		}
コード例 #11
0
		internal TimeCounter (TimerCounter counter)
		{
			this.counter = counter;
			traceList = new TimerTraceList ();
			Begin ();
		}
コード例 #12
0
ファイル: Counter.cs プロジェクト: FreeBSD-DotNet/monodevelop
		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;
		}
コード例 #13
0
		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;
		}
コード例 #14
0
ファイル: TimeCounter.cs プロジェクト: zcf7822/monodevelop
 internal TimeCounter(TimerCounter counter)
 {
     this.counter = counter;
     traceList    = new TimerTraceList();
     Begin();
 }
コード例 #15
0
ファイル: Counter.cs プロジェクト: Kalnor/monodevelop
		internal CounterValue (int value, int totalCount, DateTime timestamp)
		{
			this.value = value;
			this.timestamp = timestamp;
			this.totalCount = totalCount;
			this.message = null;
			traces = null;
			threadId = 0;
		}
コード例 #16
0
ファイル: Counter.cs プロジェクト: Kalnor/monodevelop
		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;
		}
コード例 #17
0
ファイル: Counter.cs プロジェクト: FreeBSD-DotNet/monodevelop
		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;
		}