-
Notifications
You must be signed in to change notification settings - Fork 656
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
Feature COMMANDLOG to record slow execution and large request/reply #1294
base: unstable
Are you sure you want to change the base?
Conversation
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #1294 +/- ##
============================================
+ Coverage 70.69% 70.71% +0.01%
============================================
Files 114 115 +1
Lines 63161 63209 +48
============================================
+ Hits 44650 44696 +46
- Misses 18511 18513 +2
|
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Signed-off-by: zhaozhao.zz <[email protected]>
Just for Note: Let's first refresh the memory in pr #336, the last comment conclusion is: After a core team meeting, we decided adding a new command COMMANDLOG with subcommands HEAVYTRAFFIC and SLOW, and then slowlog.c can be renamed to a common commandlog.c. #336 (comment) |
From my understanding, for the command: commandlog get should be: commandlog len should be: commandlog reset should be: Can you describe the terms heavytraffic-input and heavytraffic-output in the json file (argument part) because I can only know And I think the existing slowlog commands should be deprecated? If yes, I think you should update the related json files as well. |
Signed-off-by: zhaozhao.zz <[email protected]>
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, approved
As discussed in PR #336.
We have different types of resources like CPU, memory, network, etc. The
slowlog
can only record commands eat lots of CPU during the processing phase (doesn't include read/write network time), but can not record commands eat too many memory and network. For example:This PR introduces a new command
COMMANDLOG
, to log commands that consume significant network bandwidth, including both input and output. Users can retrieve the results usingCOMMANDLOG get <count> large-request
andCOMMANDLOG get <count> large-reply
, all subcommands forCOMMANDLOG
are:COMMANDLOG HELP
COMMANDLOG GET <count> <slow|large-request|large-reply>
COMMANDLOG LEN <slow|large-request|large-reply>
COMMANDLOG RESET <slow|large-request|large-reply>
And the slowlog is also incorporated into the commandlog.