Skip to content

Commit

Permalink
fix(sampler): pass options from kOptions
Browse files Browse the repository at this point in the history
Pass options to eventLoopDelayMetric from the validated kOptions object
for consistency. Increase a bit external mem check, with newer version
of Node it seems to be increased.
  • Loading branch information
dnlup committed Oct 3, 2020
1 parent ecba268 commit 90fddd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sampler.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Sampler extends EventEmitter {
this[kLastSampleTime] = process.hrtime()

if (this[kOptions].collect.eventLoopDelay) {
this[kEventLoopDelay] = new EventLoopDelayMetric(options.eventLoopOptions)
this[kEventLoopDelay] = new EventLoopDelayMetric(this[kOptions].eventLoopOptions)
}

if (this[kOptions].collect.cpu) {
Expand Down
2 changes: 1 addition & 1 deletion test/doc.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const checks = {
let check
let expected
if (performDetailedCheck) {
const level = 10 * 11e5
const level = 10 * 15e5
check = value > 0 && value < level
expected = `0 < x < ${level}`
} else {
Expand Down

0 comments on commit 90fddd7

Please sign in to comment.