Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add option to disable run/wait time recording #518

Merged
merged 1 commit into from Feb 21, 2024

Conversation

clydin
Copy link
Contributor

@clydin clydin commented Feb 20, 2024

An additional Piscina constructor option is now available named recordTiming which can be used to control the underlying recording of wait and run times via Node.js histograms. By default this option is true to retain existing behavior but can be set to false to disable recording. The Piscina instance properties runTime, waitTime, and utilization will not be available if this option is disabled.
For longer lived processes or usage that does not rely on the time information, this removes the continuous storage of the information from memory.

@@ -206,7 +208,8 @@ const kDefaultOptions : FilledOptions = {
taskQueue: new ArrayTaskQueue(),
niceIncrement: 0,
trackUnmanagedFds: true,
closeTimeout: 30000
closeTimeout: 30000,
recordTiming: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll prepare a PR to set this to false, as soon for v5

src/index.ts Outdated Show resolved Hide resolved
src/index.ts Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
An additional `Piscina` constructor option is now available named `recordTiming`
which can be used to control the underlying recording of wait and run times
via Node.js histograms. By default this option is `true` to retain existing behavior
but can be set to `false` to disable recording. The `Piscina` instance properties
`runTime`, `waitTime`, and `utilization` will not be available if this option is
disabled.
@metcoder95 metcoder95 merged commit 4a94cee into piscinajs:current Feb 21, 2024
7 checks passed
@clydin clydin deleted the record-timing-option branch February 21, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants