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); }
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 void OnMessage(int numMsgsInBatch, int totalBytes) { averageBatchSize.AddValue(numMsgsInBatch); batchSizeBytesHistogram.AddData(totalBytes); }
internal static void OnTurnExecutionEnd(TimeSpan timeSpan) { turnLengthHistogram.AddData(timeSpan); turnsExecutedEndTotal.Increment(); }
internal static void OnAppRequestsEnd(TimeSpan timeSpan) { appRequestsLatencyHistogram?.AddData(timeSpan); appRequestsTotalLatency?.IncrementBy(timeSpan.Ticks); totalAppRequests?.Increment(); }