-
Notifications
You must be signed in to change notification settings - Fork 26
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 heap monitoring #369
Conversation
@W-15760648@ add heap monitoring and class instrumentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! Just a question :)
QA doc here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@W-15724695@ @W-15760648@ Replace json stringify with bfj module Add tuning properties to streams Add env vars to adjust buffer size and json format indent
@CristiCanizales I am trying to resolve the broken tests, but the code should be near complete if you want to have another look. |
@@ -26,11 +28,19 @@ export class HumanFormatTransform extends Readable { | |||
super(options); | |||
this.testResult = testResult; | |||
this.detailedCoverage ??= false; | |||
this.logger = Logger.childFromRoot('HumanFormatTransform'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are the concerns to have this logger, given that we have HeapMonitor to log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No concerns. It is the same root logger that the other places where logging is done in the module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just a nit in the date in the copyright of heapMonitor file
src/utils/heapMonitor.ts
Outdated
@@ -0,0 +1,152 @@ | |||
/* | |||
* Copyright (c) 2021, salesforce.com, inc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Copyright (c) 2021, salesforce.com, inc. | |
* Copyright (c) 2024, salesforce.com, inc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change! LGTM
import { NamespaceInfo } from './types'; | ||
import type { QueryResult } from '@jsforce/jsforce-node'; | ||
|
||
const DEFAULT_BUFFER_SIZE = 256; | ||
const MIN_BUFFER_SIZE = 256; | ||
const MAX_BUFFER_SIZE = 32_768; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. I didn't know about _ used to improve the readability of large numbers 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding these validations :) Please just address xNuts tests failing before merging so we can
…phale/W-15760648-heap-monitor # Conflicts: # src/tests/codeCoverage.ts
* feat: add heap monitoring @W-15760648@ add heap monitoring and class instrumentation * chore: fix ut * chore: bump core and jsforce versions * chore: move log trace calls * chore: improve instrumentation * chore: allow only one heap monitor * chore: refactor interval assignment to c’tor * chore: bump core * chore: wip * fix: use module bfj for json string and perf tuning @W-15724695@ @W-15760648@ Replace json stringify with bfj module Add tuning properties to streams Add env vars to adjust buffer size and json format indent * chore: apply review comments * chore: fix windows ut for table * chore: fix another windows test * chore: add comments on setImmediate calls * chore: bump kit * chore: address review comments * chore: add limits to new env var values * chore: bump core to latest
What does this PR do?
add heap monitoring and class instrumentation
What issues does this PR fix or reference?
Instrumentation only
@W-15760648@