コード例 #1
0
 public void AddSample(long tickCount)
 {
     lock (instanceLock)
     {
         tickAccum.IncrementBy(tickCount);
         sampleCounter.Increment();
     }
 }
コード例 #2
0
 private static void OnMessageSend_Impl(SiloAddress targetSilo, Message.Directions direction, int numTotalBytes, int headerBytes, int numMsgsInBatch)
 {
     MessagesSentTotal.IncrementBy(numMsgsInBatch);
     MessagesSentPerDirection[(int)direction].IncrementBy(numMsgsInBatch);
     TotalBytesSent.IncrementBy(numTotalBytes);
     HeaderBytesSent.IncrementBy(headerBytes);
     sentMsgSizeHistogram.AddData(numTotalBytes);
     FindCounter(perSiloSendCounters, new StatisticName(StatisticNames.MESSAGING_SENT_MESSAGES_PER_SILO, (targetSilo != null ? targetSilo.ToString() : "Null")), CounterStorage.LogOnly).IncrementBy(numMsgsInBatch);
 }
コード例 #3
0
        public void OnDeQueueRequest(ITimeInterval itemInQueue)
        {
            itemInQueue.Stop();
            long ticks = itemInQueue.Elapsed.Ticks;

            averageTimeInQueue.AddValue(ticks);
            averageTimeInAllQueues.AddValue(ticks);
            totalTimeInAllQueues.IncrementBy(ticks);
        }
コード例 #4
0
 internal static void OnMessageReceive(CounterStatistic messageReceivedCounter, Message msg, int numTotalBytes, int headerBytes, ConnectionDirection connectionDirection)
 {
     MessagesReceived.Increment();
     MessagesReceivedPerDirection[(int)msg.Direction].Increment();
     totalBytesReceived.IncrementBy(numTotalBytes);
     headerBytesReceived.IncrementBy(headerBytes);
     receiveMsgSizeHistogram.AddData(numTotalBytes);
     messageReceivedCounter?.Increment();
     perSocketDirectionStatsReceive[(int)connectionDirection].OnMessage(1, numTotalBytes);
 }
コード例 #5
0
        internal static void OnMessageReceive(Message msg, int headerBytes, int bodyBytes)
        {
            MessagesReceived.Increment();
            MessagesReceivedPerDirection[(int)msg.Direction].Increment();
            totalBytesReceived.IncrementBy(headerBytes + bodyBytes);
            headerBytesReceived.IncrementBy(headerBytes);
            receiveMsgSizeHistogram.AddData(headerBytes + bodyBytes);
            SiloAddress addr = msg.SendingSilo;

            FindCounter(perSiloReceiveCounters, new StatisticName(StatisticNames.MESSAGING_RECEIVED_MESSAGES_PER_SILO, (addr != null ? addr.ToString() : "Null")), CounterStorage.LogOnly).Increment();
        }
コード例 #6
0
        internal void OnAppRequestsEnd(TimeSpan timeSpan)
        {
            if (!this.CollectApplicationRequestsStats)
            {
                return;
            }

            appRequestsLatencyHistogram?.AddData(timeSpan);
            appRequestsTotalLatency?.IncrementBy(timeSpan.Ticks);
            totalAppRequests?.Increment();
        }
コード例 #7
0
        internal static void OnMessageSend(CounterStatistic messageSendCounter, Message msg, int numTotalBytes, int headerBytes, ConnectionDirection connectionDirection)
        {
            Debug.Assert(numTotalBytes >= 0, $"OnMessageSend(numTotalBytes={numTotalBytes})");
            MessagesSentTotal.Increment();
            MessagesSentPerDirection[(int)msg.Direction].Increment();

            TotalBytesSent.IncrementBy(numTotalBytes);
            HeaderBytesSent.IncrementBy(headerBytes);
            sentMsgSizeHistogram.AddData(numTotalBytes);
            messageSendCounter?.Increment();
            perSocketDirectionStatsSend[(int)connectionDirection].OnMessage(1, numTotalBytes);
        }
コード例 #8
0
 internal static void OnWorkItemDrop(int n)
 {
     totalPendingWorkItems.DecrementBy(n);
     turnsDroppedTotal.IncrementBy(n);
 }
コード例 #9
0
 internal static void OnAppRequestsEnd(TimeSpan timeSpan)
 {
     appRequestsLatencyHistogram?.AddData(timeSpan);
     appRequestsTotalLatency?.IncrementBy(timeSpan.Ticks);
     totalAppRequests?.Increment();
 }
コード例 #10
0
 public void OnEnQueueRequest(int numEnqueuedRequests, int queueLength)
 {
     numEnqueuedRequestsCounter.IncrementBy(numEnqueuedRequests);
     averageQueueSizeCounter.AddValue(queueLength);
 }
コード例 #11
0
 public override void AddValue(long value)
 {
     totalSum.IncrementBy(value);
     numItems.Increment();
 }