@dnlup/doc
Advanced tools
Comparing version 4.0.0-0 to 4.0.0-1
@@ -5,2 +5,14 @@ # Changelog | ||
## [4.0.0-1](https://github.com/dnlup/doc/compare/v4.0.0-0...v4.0.0-1) (2021-03-13) | ||
### ⚠ BREAKING CHANGES | ||
* **config:** the option `eventLoopOptions` has been replaced by | ||
`eventLoopDelayOptions`. | ||
### Bug Fixes | ||
* **config:** rename eventLoopOptions ([289b10d](https://github.com/dnlup/doc/commit/289b10d666b0a00b3dac97aac8489134cbf9e7de)) | ||
## [4.0.0-0](https://github.com/dnlup/doc/compare/v3.1.0...v4.0.0-0) (2021-03-13) | ||
@@ -7,0 +19,0 @@ |
@@ -17,4 +17,3 @@ 'use strict' | ||
unref: true, | ||
// TODO: rename to eventLoopDelayOptions | ||
eventLoopOptions: { | ||
eventLoopDelayOptions: { | ||
resolution: 10 | ||
@@ -64,16 +63,16 @@ }, | ||
if (conf.eventLoopOptions.resolution === undefined || conf.eventLoopOptions.resolution === null) { | ||
conf.eventLoopOptions.resolution = DEFAULTS.eventLoopOptions.resolution | ||
if (conf.eventLoopDelayOptions.resolution === undefined || conf.eventLoopDelayOptions.resolution === null) { | ||
conf.eventLoopDelayOptions.resolution = DEFAULTS.eventLoopDelayOptions.resolution | ||
} | ||
if (typeof conf.eventLoopOptions.resolution !== 'number') { | ||
throw new InvalidArgumentError(`eventLoopOptions.resolution must be a number, received ${typeof conf.eventLoopOptions.resolution} ${conf.eventLoopOptions.resolution}`) | ||
if (typeof conf.eventLoopDelayOptions.resolution !== 'number') { | ||
throw new InvalidArgumentError(`eventLoopDelayOptions.resolution must be a number, received ${typeof conf.eventLoopDelayOptions.resolution} ${conf.eventLoopDelayOptions.resolution}`) | ||
} | ||
if (conf.eventLoopOptions.resolution < 1) { | ||
throw new InvalidArgumentError(`eventLoopOptions.resolution must be > 1, received ${conf.eventLoopOptions.resolution}`) | ||
if (conf.eventLoopDelayOptions.resolution < 1) { | ||
throw new InvalidArgumentError(`eventLoopDelayOptions.resolution must be > 1, received ${conf.eventLoopDelayOptions.resolution}`) | ||
} | ||
if (conf.eventLoopOptions.resolution > conf.sampleInterval) { | ||
throw new InvalidArgumentError(`eventLoopOptions.resolution must be < sampleInterval, received ${conf.eventLoopOptions.resolution}`) | ||
if (conf.eventLoopDelayOptions.resolution > conf.sampleInterval) { | ||
throw new InvalidArgumentError(`eventLoopDelayOptions.resolution must be < sampleInterval, received ${conf.eventLoopDelayOptions.resolution}`) | ||
} | ||
@@ -106,3 +105,3 @@ | ||
function config ({ | ||
eventLoopOptions, | ||
eventLoopDelayOptions, | ||
gcOptions, | ||
@@ -114,3 +113,3 @@ collect, | ||
...rest, | ||
eventLoopOptions: Object.assign({}, DEFAULTS.eventLoopOptions, eventLoopOptions), | ||
eventLoopDelayOptions: Object.assign({}, DEFAULTS.eventLoopDelayOptions, eventLoopDelayOptions), | ||
gcOptions: Object.assign({}, DEFAULTS.gcOptions, gcOptions), | ||
@@ -124,4 +123,4 @@ collect: Object.assign({}, DEFAULTS.collect, collect) | ||
unref: merged.unref, | ||
eventLoopOptions: { | ||
resolution: merged.eventLoopOptions.resolution | ||
eventLoopDelayOptions: { | ||
resolution: merged.eventLoopDelayOptions.resolution | ||
}, | ||
@@ -128,0 +127,0 @@ gcOptions: { |
@@ -35,3 +35,3 @@ 'use strict' | ||
if (this[kOptions].collect.eventLoopDelay) { | ||
this[kEventLoopDelay] = new EventLoopDelayMetric(this[kOptions].eventLoopOptions) | ||
this[kEventLoopDelay] = new EventLoopDelayMetric(this[kOptions].eventLoopDelayOptions) | ||
} | ||
@@ -38,0 +38,0 @@ |
{ | ||
"name": "@dnlup/doc", | ||
"version": "4.0.0-0", | ||
"version": "4.0.0-1", | ||
"description": "Get usage and health data about your Node.js process", | ||
@@ -13,3 +13,4 @@ "main": "index.js", | ||
"test": "npm run test:js && npm run test:ts", | ||
"test:ci": "npm run lint && npm run test:js -- --coverage-report=lcovonly && npm run test:ts", | ||
"pretest:ci": "npm run lint", | ||
"test:ci": "npm run test:js -- --coverage-report=lcovonly && npm run test:ts", | ||
"test:js": "tap -J test/**.test.js", | ||
@@ -84,3 +85,3 @@ "test:ts": "tsd", | ||
"eslint-plugin-standard": "^5.0.0", | ||
"husky": "^5.0.9", | ||
"husky": "^5.1.3", | ||
"is-ci": "^3.0.0", | ||
@@ -87,0 +88,0 @@ "lint-staged": "^10.5.3", |
@@ -195,3 +195,3 @@ # doc | ||
* `flags` `<boolean>`: , Track statistics about the flags of each (aggregated) garbage collection operation (see https://nodejs.org/docs/latest-v12.x/api/perf_hooks.html#perf_hooks_performanceentry_flags). `aggregate` has to be `true` to enable this option. **Default:** `true` on Node version `12.17.0` and newer. | ||
* `eventLoopOptions` `<Object>`: Options to setup [`monitorEventLoopDelay`](https://nodejs.org/docs/latest-v12.x/api/perf_hooks.html#perf_hooks_perf_hooks_monitoreventloopdelay_options). **Default:** `{ resolution: 10 }` | ||
* `eventLoopDelayOptions` `<Object>`: Options to setup [`monitorEventLoopDelay`](https://nodejs.org/docs/latest-v12.x/api/perf_hooks.html#perf_hooks_perf_hooks_monitoreventloopdelay_options). **Default:** `{ resolution: 10 }` | ||
* `collect` `<Object>`: enable/disable the collection of specific metrics. | ||
@@ -198,0 +198,0 @@ * `cpu` `<boolean>`: enable cpu metric. **Default:** `true`. |
@@ -26,3 +26,3 @@ import { EventEmitter } from 'events' | ||
*/ | ||
eventLoopOptions?: { | ||
eventLoopDelayOptions?: { | ||
/** | ||
@@ -29,0 +29,0 @@ * The sampling rate in milliseconds. Must be greater than zero and than the sampleInterval. Default: 10. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56488
894