-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(client): implement LATENCY RESET command #3039
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
base: master
Are you sure you want to change the base?
Conversation
Adds the LATENCY RESET command to the client, including: - transformArguments and transformReply logic. - Comprehensive unit tests for argument transformation. - An integration test to verify end-to-end functionality. - Updates to packages/client/lib/commands/index.ts to expose the command.
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.
Hi @watersRand, thanks for the contribution. In general the PR looks very good, just some minor adjustments needed.
Sidenote: It would be interesting to see your prompts :)
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.
Most of the comments here are unnecessary. Lets only keep the jsdocs
package-lock.json
Outdated
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.
this file should not be part of the PR
// Set a generous timeout for the entire test suite. | ||
// This is crucial for the Docker container to spin up and client to connect reliably. | ||
this.timeout(300000); // 5 minutes |
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.
You can remove this, its not needed in CI etc.
assert.deepEqual(latestLatencyAfterMultipleReset, [], 'Expected no latency events after multiple specified resets.'); | ||
|
||
}, { | ||
// These options are passed to testUtils.testWithClient for setting up the Redis server and client. |
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.
Unnecessary comment
}, { | ||
// These options are passed to testUtils.testWithClient for setting up the Redis server and client. | ||
...GLOBAL.SERVERS.OPEN, | ||
clientOptions: { // Configure the client created by testWithClient |
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.
Unnecessary comment
...GLOBAL.SERVERS.OPEN, | ||
clientOptions: { // Configure the client created by testWithClient | ||
socket: { | ||
connectTimeout: 300000 // Set client connection timeout to 5 minutes (300000ms) |
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.
Unnecessary comment
Here's the modified Pull Request description, filling in the details based on our work and including the important note about the testing environment.