internal static void OnMessageSend(SiloAddress targetSilo, Message.Directions direction, int numTotalBytes, int headerBytes, SocketDirection socketDirection) { if (numTotalBytes < 0) { throw new ArgumentException(String.Format("OnMessageSend(numTotalBytes={0})", numTotalBytes), "numTotalBytes"); } OnMessageSend_Impl(targetSilo, direction, numTotalBytes, headerBytes, 1); }
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 OnMessageBatchSend(SiloAddress targetSilo, Message.Directions direction, int numTotalBytes, int headerBytes, SocketDirection socketDirection, int numMsgsInBatch) { if (numTotalBytes < 0) { throw new ArgumentException(String.Format("OnMessageBatchSend(numTotalBytes={0})", numTotalBytes), "numTotalBytes"); } OnMessageSend_Impl(targetSilo, direction, numTotalBytes, headerBytes, numMsgsInBatch); perSocketDirectionStatsSend[(int)socketDirection].OnMessage(numMsgsInBatch, numTotalBytes); }