internal void OnAppRequestsTimedOut() { if (!this.CollectApplicationRequestsStats) { return; } timedOutRequests?.Increment(); }
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 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); }
public void Release(byte[] buffer) { if (buffer.Length == byteBufferSize) { if (buffers.TryAdd(buffer)) { checkedInBufferCounter.Increment(); } else { droppedBufferCounter.Increment(); } } else { droppedBufferCounter.Increment(); } }
//------ internal static void OnThreadStartsTurnExecution(int workerThread, ISchedulingContext context) { turnsExecutedStartTotal.Increment(); if (context == null) { turnsExecutedPerWorkerThreadNull[workerThread].Increment(); turnsExecutedByAllWorkerThreadsTotalNullTurns.Increment(); } else if (context.ContextType == SchedulingContextType.SystemTarget) { turnsExecutedPerWorkerThreadSystemTurns[workerThread].Increment(); turnsExecutedByAllWorkerThreadsTotalSystemTurns.Increment(); } else if (context.ContextType == SchedulingContextType.Activation) { turnsExecutedPerWorkerThreadApplicationTurns[workerThread].Increment(); turnsExecutedByAllWorkerThreadsTotalApplicationTurns.Increment(); } }
internal static void OnTurnExecutionStartsByWorkGroup(int workItemGroup, int workerThread, ISchedulingContext context) { turnsExecutedStartTotal.Increment(); turnsExecutedPerWorkItemGroup[workItemGroup].Increment(); if (context == null) { throw new ArgumentException(String.Format("Cannot execute null context work item on work item group {0}.", workItemGroup)); } if (context.ContextType == SchedulingContextType.SystemTarget) { turnsExecutedByAllWorkItemGroupsTotalSystem.Increment(); turnsExecutedPerWorkerThreadSystemTurns[workerThread].Increment(); turnsExecutedByAllWorkerThreadsTotalSystemTurns.Increment(); } else if (context.ContextType == SchedulingContextType.Activation) { turnsExecutedByAllWorkItemGroupsTotalApplicationTurns.Increment(); turnsExecutedPerWorkerThreadApplicationTurns[workerThread].Increment(); turnsExecutedByAllWorkerThreadsTotalApplicationTurns.Increment(); } }
public void Release(byte[] buffer) { if (buffer.Length == byteBufferSize) { if (limitBuffersCount && currentBufferCount > maxBuffersCount) { droppedBufferCounter.Increment(); return; } buffers.Add(buffer); if (limitBuffersCount) { Interlocked.Increment(ref currentBufferCount); } checkedInBufferCounter.Increment(); } else { droppedTooLargeBufferCounter.Increment(); } }
internal static void OnIgcMessageResend(Message msg) { igcMessagesResent.Increment(); }
internal static void OnIgcMessageForwared(Message msg) { igcMessagesForwarded.Increment(); }
internal static void OnTurnExecutionEnd(TimeSpan timeSpan) { turnLengthHistogram.AddData(timeSpan); turnsExecutedEndTotal.Increment(); }
internal static void OnClosureWorkItemsExecuted() { closureWorkItemsExecuted.Increment(); }
internal static void OnWorkItemDequeue() { totalPendingWorkItems.DecrementBy(1); turnsDeQueuedTotal.Increment(); }
internal void OnClosureWorkItemsCreated() { closureWorkItemsCreated.Increment(); }
internal static void OnIgcMessageReRoute(Message msg) { igcMessagesReRoute.Increment(); }
internal static void OnDispatcherMessageProcessedOk(Message msg) { dispatcherMessagesProcessedOkPerDirection[(int)msg.Direction].Increment(); dispatcherMessagesProcessedTotal.Increment(); }
internal static void OnStorageReadError(string grainType, GrainReference grain) { StorageReadErrors.Increment(); }
internal static void OnDispatcherMessageForwared(Message msg) { dispatcherMessagesForwarded.Increment(); }
public override void AddValue(long value) { totalSum.IncrementBy(value); numItems.Increment(); }
internal static void OnStorageDeleteError(string grainType, GrainReference grain) { StorageClearErrors.Increment(); }
internal static void OnStorageActivateError(string grainType) { StorageActivateErrors.Increment(); }
internal static void OnImaMessageReceived(Message msg) { imaReceived.Increment(); }
internal static void OnAppRequestsEnd(TimeSpan timeSpan) { appRequestsLatencyHistogram?.AddData(timeSpan); appRequestsTotalLatency?.IncrementBy(timeSpan.Ticks); totalAppRequests?.Increment(); }
internal static void OnStorageActivateError(IStorageProvider storage, string grainType, GrainReference grain) { StorageActivateErrors.Increment(); }
internal static void OnAppRequestsTimedOut() { timedOutRequests?.Increment(); }
/// <summary> /// Register a new object to which messages can be delivered with the local lookup table and scheduler. /// </summary> /// <param name="activation"></param> public void RegisterMessageTarget(IGrainContext activation) { activations.RecordNewTarget(activation); activationsCreated.Increment(); }
//----------- Global scheduler stats ---------------------// internal static void OnWorkItemEnqueue() { totalPendingWorkItems.Increment(); turnsEnQueuedTotal.Increment(); }