From 41b1d88d1681d4d65185d936f977d4f3becb19cb Mon Sep 17 00:00:00 2001 From: Matthew Keil Date: Thu, 12 Oct 2023 02:22:23 +0200 Subject: [PATCH] refactor: remove Sec suffix in metric variable name --- packages/beacon-node/src/metrics/metrics/lodestar.ts | 2 +- packages/beacon-node/src/network/core/metrics.ts | 2 +- packages/beacon-node/src/util/workerEvents.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/beacon-node/src/metrics/metrics/lodestar.ts b/packages/beacon-node/src/metrics/metrics/lodestar.ts index 898883efb022..a5871f56d460 100644 --- a/packages/beacon-node/src/metrics/metrics/lodestar.ts +++ b/packages/beacon-node/src/metrics/metrics/lodestar.ts @@ -110,7 +110,7 @@ export function createLodestarMetrics( help: "Current count of pending items in reqRespBridgeReqCaller data structure", }), }, - networkWorkerWireEventsOnMainThreadLatencySec: register.histogram<"eventName">({ + networkWorkerWireEventsOnMainThreadLatency: register.histogram<"eventName">({ name: "lodestar_network_worker_wire_events_on_main_thread_latency_seconds", help: "Latency in seconds to transmit network events to main thread across worker port", labelNames: ["eventName"], diff --git a/packages/beacon-node/src/network/core/metrics.ts b/packages/beacon-node/src/network/core/metrics.ts index f5fc651e2927..a0b6e88ba096 100644 --- a/packages/beacon-node/src/network/core/metrics.ts +++ b/packages/beacon-node/src/network/core/metrics.ts @@ -318,7 +318,7 @@ export function getNetworkCoreWorkerMetrics(register: RegistryMetricCreator) { name: "lodestar_network_worker_reqresp_bridge_caller_pending_count", help: "Current count of pending elements in respBridgeCaller", }), - networkWorkerWireEventsOnWorkerThreadLatencySec: register.histogram<"eventName">({ + networkWorkerWireEventsOnWorkerThreadLatency: register.histogram<"eventName">({ name: "lodestar_network_worker_wire_events_on_worker_thread_latency_seconds", help: "Latency in seconds to transmit network events to worker thread across parent port", labelNames: ["eventName"], diff --git a/packages/beacon-node/src/util/workerEvents.ts b/packages/beacon-node/src/util/workerEvents.ts index b90398b44846..409d9f825d5b 100644 --- a/packages/beacon-node/src/util/workerEvents.ts +++ b/packages/beacon-node/src/util/workerEvents.ts @@ -42,7 +42,7 @@ export function wireEventsOnWorkerThread( ) { const [sec, nanoSec] = process.hrtime(data.posted); const networkWorkerLatency = sec + nanoSec / NANO_TO_SECOND_CONVERSION; - metrics?.networkWorkerWireEventsOnWorkerThreadLatencySec.observe( + metrics?.networkWorkerWireEventsOnWorkerThreadLatency.observe( {eventName: data.event as string}, networkWorkerLatency ); @@ -83,7 +83,7 @@ export function wireEventsOnMainThread( ) { const [sec, nanoSec] = process.hrtime(data.posted); const networkWorkerLatency = sec + nanoSec / NANO_TO_SECOND_CONVERSION; - metrics?.networkWorkerWireEventsOnMainThreadLatencySec.observe( + metrics?.networkWorkerWireEventsOnMainThreadLatency.observe( {eventName: data.event as string}, networkWorkerLatency );