Skip to content

Commit fd593d0

Browse files
committed
feedmessage_matching_time_seconds metric: summary -> gauge 💥
1 parent 10590bb commit fd593d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎lib/match.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {cpus as osCpus} from 'node:os'
22
import {ok, strictEqual} from 'node:assert'
3-
import {Summary} from 'prom-client'
3+
import {Gauge} from 'prom-client'
44
import pLimit from 'p-limit'
55
import gtfsRtBindings from './mta-gtfs-realtime.pb.js'
66
import {connectToPostgres} from './db.js'
@@ -44,7 +44,7 @@ const parseEncodedFeed = (feedEncoded) => {
4444
return feedMessage
4545
}
4646

47-
const _matchingTimeSeconds = new Summary({
47+
const _matchingTimeSeconds = new Gauge({
4848
name: 'feedmessage_matching_time_seconds',
4949
help: 'time needed to match an entire FeedMessage with the GTFS Schedule data',
5050
registers: [metricsRegister],
@@ -146,7 +146,7 @@ const createParseAndProcessFeed = (cfg) => {
146146
const t0 = performance.now()
147147
await Promise.all(feedMessage.entity.map(queueFeedEntityMatching))
148148
const matchingTime = (performance.now() - t0) / 1000
149-
_matchingTimeSeconds.observe({
149+
_matchingTimeSeconds.set({
150150
'schedule_feed_digest': scheduleFeedDigestSlice,
151151
}, matchingTime)
152152
_logger.debug({

0 commit comments

Comments
 (0)