Skip to content

Commit

Permalink
fix: Custom PerformanceEntry accessors are deprecated. Please use the…
Browse files Browse the repository at this point in the history
… detail property.
  • Loading branch information
marcbachmann committed Sep 12, 2021
1 parent f7d0a8b commit 191958f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics/gc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = (meter, {prefix, labels, gcDurationBuckets}) => {
const obs = new PerformanceObserver(list => {
const entry = list.getEntries()[0]
// Convert duration from milliseconds to seconds
kinds[entry.kind].record(entry.duration / 1000)
kinds[entry.detail ? entry.detail.kind : entry.kind].record(entry.duration / 1000)
})

// We do not expect too many gc events per second, so we do not use buffering
Expand Down

0 comments on commit 191958f

Please sign in to comment.