func (p *ContainerMetricProcessor) Process(e *events.Envelope) []metrics.Metric { processedMetrics := make([]metrics.Metric, 3) containerMetricEvent := e.GetContainerMetric() processedMetrics[0] = metrics.Metric(p.ProcessContainerMetricCPU(containerMetricEvent)) processedMetrics[1] = metrics.Metric(p.ProcessContainerMetricMemory(containerMetricEvent)) processedMetrics[2] = metrics.Metric(p.ProcessContainerMetricDisk(containerMetricEvent)) return processedMetrics }
func (p *HttpStartStopProcessor) Process(e *events.Envelope) []metrics.Metric { processedMetrics := make([]metrics.Metric, 4) httpStartStopEvent := e.GetHttpStartStop() processedMetrics[0] = metrics.Metric(p.ProcessHttpStartStopResponseTime(httpStartStopEvent)) processedMetrics[1] = metrics.Metric(p.ProcessHttpStartStopStatusCodeCount(httpStartStopEvent)) processedMetrics[2] = metrics.Metric(p.ProcessHttpStartStopHttpErrorCount(httpStartStopEvent)) processedMetrics[3] = metrics.Metric(p.ProcessHttpStartStopHttpRequestCount(httpStartStopEvent)) return processedMetrics }
func (p *HeartbeatProcessor) Process(e *events.Envelope) []metrics.Metric { processedMetrics := make([]metrics.Metric, 4) heartbeat := e.GetHeartbeat() origin := e.GetOrigin() processedMetrics[0] = metrics.Metric(p.ProcessHeartbeatCount(heartbeat, origin)) processedMetrics[1] = metrics.Metric(p.ProcessHeartbeatEventsSentCount(heartbeat, origin)) processedMetrics[2] = metrics.Metric(p.ProcessHeartbeatEventsReceivedCount(heartbeat, origin)) processedMetrics[3] = metrics.Metric(p.ProcessHeartbeatEventsErrorCount(heartbeat, origin)) return processedMetrics }
func (p *CounterProcessor) Process(e *events.Envelope) []metrics.Metric { processedMetrics := make([]metrics.Metric, 1) counterEvent := e.GetCounterEvent() processedMetrics[0] = metrics.Metric(p.ProcessCounter(counterEvent)) return processedMetrics }