Exemplo n.º 1
0
        private static Sensor ThroughputSensor(string threadId,
                                               TaskId taskId,
                                               string processorNodeId,
                                               string metricNamePrefix,
                                               string metricDescription,
                                               string descriptionOfRate,
                                               string descriptionOfCount,
                                               MetricsRecordingLevel recordingLevel,
                                               StreamMetricsRegistry metricsRegistry)
        {
            Sensor sensor =
                metricsRegistry.NodeLevelSensor(threadId, taskId, processorNodeId, metricNamePrefix, metricDescription,
                                                recordingLevel);
            var tags = metricsRegistry.NodeLevelTags(threadId, taskId.ToString(), processorNodeId);

            SensorHelper.AddInvocationRateAndCountToSensor(
                sensor,
                StreamMetricsRegistry.PROCESSOR_NODE_LEVEL_GROUP,
                tags,
                metricNamePrefix,
                descriptionOfRate,
                descriptionOfCount
                );
            return(sensor);
        }