Skip to content

Commit

Permalink
refactor: remove Sec suffix in metric variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewkeil committed Oct 12, 2023
1 parent 09e787f commit 41b1d88
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/beacon-node/src/metrics/metrics/lodestar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-node/src/network/core/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
4 changes: 2 additions & 2 deletions packages/beacon-node/src/util/workerEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function wireEventsOnWorkerThread<EventData>(
) {
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
);
Expand Down Expand Up @@ -83,7 +83,7 @@ export function wireEventsOnMainThread<EventData>(
) {
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
);
Expand Down

0 comments on commit 41b1d88

Please sign in to comment.