コード例 #1
0
        /// <summary>
        /// Emits the latency reading
        /// </summary>
        public static void Emit(IInstrumentation inst, string ctxName, string queryName, long msLatency, string queryParam = null)
        {
            if (inst == null || !inst.Enabled)
            {
                return;
            }
            var src   = $"{ctxName}::{queryName}::{queryParam}";
            var datum = new DataQueryLatency(src, msLatency);

            inst.Record(datum);

            datum = new DataQueryLatency(UNSPECIFIED_SOURCE, msLatency);//general
            inst.Record(datum);
        }
コード例 #2
0
ファイル: Gauges.cs プロジェクト: sergey-msu/azos
 public static void Record(IInstrumentation inst, Node node, long value)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new ServerTransportChannelCount(node.ToString(), value));
     }
 }
コード例 #3
0
ファイル: Gauges.cs プロジェクト: sergey-msu/azos
 public static void Record(IInstrumentation inst, string key, double value)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new ClientCallRoundtripTime(key, value));
     }
 }
コード例 #4
0
ファイル: Gauges.cs プロジェクト: sergey-msu/azos
 public static void Record(IInstrumentation inst, Node node, long value)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new ClientTotalErrors(node.ToString(), value));
     }
 }
コード例 #5
0
ファイル: Gauges.cs プロジェクト: sergey-msu/azos
 public static void Record(IInstrumentation inst, long value)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new ClientTimedOutCallSlotsRemoved(value));
     }
 }
コード例 #6
0
ファイル: CacheGauges.cs プロジェクト: rstonkus/azos
 public static void Happened(IInstrumentation inst, string tableName)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new CacheTableSwept(tableName));
     }
 }
コード例 #7
0
ファイル: Gauges.cs プロジェクト: sergey-msu/azos
 public static void Record(IInstrumentation inst, long value, string src = null)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new AvailableRAM(src, value));
     }
 }
コード例 #8
0
 public static void Happened(IInstrumentation inst, Node node)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new ServerSerializedOverMaxMsgSizeErrorEvent(node.ToString()));
     }
 }
コード例 #9
0
 public static void Happened(IInstrumentation inst, Node node)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new ServerListenerErrorEvent(node.ToString()));
     }
 }
コード例 #10
0
 public static void Record(IInstrumentation inst, string source, long value)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new MessagingSinkErrorCount(source, value));
     }
 }
コード例 #11
0
 public static void Record(IInstrumentation inst, long value)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new FiredEventCount(value));
     }
 }
コード例 #12
0
ファイル: Gauges.cs プロジェクト: sergey-msu/azos
 public static void Record(IInstrumentation inst, long value)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new RAMUsage(value));
     }
 }
コード例 #13
0
 public static void Record(IInstrumentation inst, string source, long value)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new LogMsgCount(source, value));
     }
 }
コード例 #14
0
ファイル: Gauges.cs プロジェクト: sergey-msu/azos
 public static void Record(IInstrumentation inst, Node node, long value)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new ServerTotalMsgSent(node.ToString(), value));
     }
 }
コード例 #15
0
 public static void Happened(IInstrumentation inst, string from)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new ClientDisconnectedEvent(from));
     }
 }
コード例 #16
0
 public static void Happened(IInstrumentation inst)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new AuthLocationReadTotalFailureEvent());
     }
 }
コード例 #17
0
 public static void Happened(IInstrumentation inst, string scope, string seq)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new AuthEraPromotedEvent("{0}:{1}".Args(scope, seq)));
     }
 }
コード例 #18
0
 public static void Happened(IInstrumentation inst, string location)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new AuthLocationReadFailureEvent(location));
     }
 }
コード例 #19
0
 public static void Happened(IInstrumentation inst, string scope, string seq, int block, string authority)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new AllocBlockFailureEvent("{0}::{1}::{2}".Args(scope, seq, authority)));
     }
 }
コード例 #20
0
ファイル: SelfInstruments.cs プロジェクト: wangchengqun/azos
 public static void Record(IInstrumentation inst, long value)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new ProcessingInterval(value));
     }
 }
コード例 #21
0
 public static void Happened(IInstrumentation inst, Node node)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new InactiveServerTransportClosedEvent(node.ToString()));
     }
 }
コード例 #22
0
 /// <summary>
 /// Create event from exception instance
 /// </summary>
 public static void Record(IInstrumentation inst, Exception error)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new ExceptionEvent(error));
     }
 }
コード例 #23
0
 public static void Happened(IInstrumentation inst)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new CallSlotNotFoundErrorEvent());
     }
 }
コード例 #24
0
 /// <summary>
 /// Create event from exception instance as of utcTime
 /// </summary>
 public static void Record(IInstrumentation inst, string source, Exception error, DateTime utcTime)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new ExceptionEvent(source, error, utcTime));
     }
 }
コード例 #25
0
 public static void Happened(IInstrumentation inst, Node node)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new ClientDeserializationErrorEvent(node.ToString()));
     }
 }
コード例 #26
0
 public static void Happened(IInstrumentation inst, string scope, string seq)
 {
     if (inst != null && inst.Enabled)
     {
         inst.Record(new AllocBlockRequestedEvent("{0}::{1}".Args(scope, seq)));
     }
 }
コード例 #27
0
 protected override void DoDumpStats(IInstrumentation instr, DateTime utcNow)
 {
     instr.Record(new Instrumentation.EnqueueCalls(Interlocked.Exchange(ref m_stat_EnqueueCalls, 0)));
     m_stat_EnqueueTodoCount.SnapshotAllLongsInto <Instrumentation.EnqueueTodoCount>(instr, 0);
     instr.Record(new Instrumentation.QueueThreadSpins(Interlocked.Exchange(ref m_stat_QueueThreadSpins, 0)));
     m_stat_ProcessOneQueueCount.SnapshotAllLongsInto <Instrumentation.ProcessOneQueueCount>(instr, 0);
     m_stat_MergedTodoCount.SnapshotAllLongsInto <Instrumentation.MergedTodoCount>(instr, 0);
     m_stat_FetchedTodoCount.SnapshotAllLongsInto <Instrumentation.FetchedTodoCount>(instr, 0);
     m_stat_ProcessedTodoCount.SnapshotAllLongsInto <Instrumentation.ProcessedTodoCount>(instr, 0);
     m_stat_PutTodoCount.SnapshotAllLongsInto <Instrumentation.PutTodoCount>(instr, 0);
     m_stat_UpdateTodoCount.SnapshotAllLongsInto <Instrumentation.UpdateTodoCount>(instr, 0);
     m_stat_CompletedTodoCount.SnapshotAllLongsInto <Instrumentation.CompletedTodoCount>(instr, 0);
     m_stat_CompletedOkTodoCount.SnapshotAllLongsInto <Instrumentation.CompletedOkTodoCount>(instr, 0);
     m_stat_CompletedErrorTodoCount.SnapshotAllLongsInto <Instrumentation.CompletedErrorTodoCount>(instr, 0);
     m_stat_QueueOperationErrorCount.SnapshotAllLongsInto <Instrumentation.QueueOperationErrorCount>(instr, 0);
     m_stat_TodoDuplicationCount.SnapshotAllLongsInto <Instrumentation.TodoDuplicationCount>(instr, 0);
 }
コード例 #28
0
        /// <summary>
        /// Emits the Api latency reading and ApiCallEvent
        /// </summary>
        public static void EmitApiCall(IInstrumentation inst, string ctxName, string uri, long msLatency, bool emitEvent = true)
        {
            if (inst == null || !inst.Enabled)
            {
                return;
            }
            var src   = $"{ctxName}::{uri}";
            var datum = new ApiLatency(src, msLatency);

            inst.Record(datum);

            datum = new ApiLatency(UNSPECIFIED_SOURCE, msLatency);//general
            inst.Record(datum);

            if (emitEvent)
            {
                inst.Record(new ApiCallEvent(src));
                inst.Record(new ApiCallEvent(UNSPECIFIED_SOURCE));
            }
        }