func (p *HttpStartStopProcessor) ProcessHttpStartStopResponseTime(event *events.HttpStartStop) *metrics.TimingMetric { statPrefix := "http.responsetimes." hostname := strings.Replace(strings.Split(event.GetUri(), "/")[0], ".", "_", -1) stat := statPrefix + hostname startTimestamp := event.GetStartTimestamp() stopTimestamp := event.GetStopTimestamp() durationNanos := stopTimestamp - startTimestamp durationMillis := durationNanos / 1000000 // NB: loss of precision here metric := metrics.NewTimingMetric(stat, durationMillis) return metric }