Skip to content

Commit

Permalink
feat: PRT - change time measurement from ms to us (#1596)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranlavanet authored Jul 28, 2024
1 parent 38fc9f6 commit c5d38d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions protocol/metrics/metrics_consumer_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ func NewConsumerMetricsManager(options ConsumerMetricsManagerOptions) *ConsumerM
}, []string{"spec", "apiInterface"})

relayProcessingLatencyBeforeProvider := prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: "relay_processing_latency_before_provider_ms",
Help: "average latency of processing a successful relay before it is sent to the provider",
Name: "lava_relay_processing_latency_before_provider_in_micro_seconds",
Help: "average latency of processing a successful relay before it is sent to the provider in µs (10^6)",
}, []string{"spec", "apiInterface"})
relayProcessingLatencyAfterProvider := prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: "relay_processing_latency_after_provider_ms",
Help: "average latency of processing a successful relay after it is received from the provider",
Name: "lava_relay_processing_latency_after_provider_in_micro_seconds",
Help: "average latency of processing a successful relay after it is received from the provider in µs (10^6)",
}, []string{"spec", "apiInterface"})
// Register the metrics with the Prometheus registry.
prometheus.MustRegister(totalCURequestedMetric)
Expand Down Expand Up @@ -290,7 +290,7 @@ func (pme *ConsumerMetricsManager) updateRelayProcessingLatency(latency time.Dur
}
currentLatency.AddLatency(latency)
pme.averageProcessingLatency[key] = currentLatency
return float64(currentLatency.AverageLatency.Milliseconds())
return float64(currentLatency.AverageLatency.Microseconds())
}

func (pme *ConsumerMetricsManager) SetRelaySentByNewBatchTickerMetric(chainId string, apiInterface string) {
Expand Down

0 comments on commit c5d38d1

Please sign in to comment.