public void AddSample(long tickCount) { lock (instanceLock) { tickAccum.IncrementBy(tickCount); sampleCounter.Increment(); } }
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); }
public void OnDeQueueRequest(ITimeInterval itemInQueue) { itemInQueue.Stop(); long ticks = itemInQueue.Elapsed.Ticks; averageTimeInQueue.AddValue(ticks); averageTimeInAllQueues.AddValue(ticks); totalTimeInAllQueues.IncrementBy(ticks); }
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); }
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(); }
internal void OnAppRequestsEnd(TimeSpan timeSpan) { if (!this.CollectApplicationRequestsStats) { return; } appRequestsLatencyHistogram?.AddData(timeSpan); appRequestsTotalLatency?.IncrementBy(timeSpan.Ticks); totalAppRequests?.Increment(); }
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); }
internal static void OnWorkItemDrop(int n) { totalPendingWorkItems.DecrementBy(n); turnsDroppedTotal.IncrementBy(n); }
internal static void OnAppRequestsEnd(TimeSpan timeSpan) { appRequestsLatencyHistogram?.AddData(timeSpan); appRequestsTotalLatency?.IncrementBy(timeSpan.Ticks); totalAppRequests?.Increment(); }
public void OnEnQueueRequest(int numEnqueuedRequests, int queueLength) { numEnqueuedRequestsCounter.IncrementBy(numEnqueuedRequests); averageQueueSizeCounter.AddValue(queueLength); }
public override void AddValue(long value) { totalSum.IncrementBy(value); numItems.Increment(); }