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

Add latency sample for transaction and pipeline #1424

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

RayaCoo
Copy link
Contributor

@RayaCoo RayaCoo commented Dec 11, 2024

If users put too many commands in a transaction or pipeline, the execution time might exceed the latency_monitor_threshold value.
So, Maybe it's necessary to record latency for pipeline and transaction, which can help them to find out potential misuse of transaction or pipeline.

Signed-off-by: Ray Cao <zisong.cw@alibaba-inc.com>
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.87%. Comparing base (1acf7f7) to head (e9cecce).
Report is 31 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1424      +/-   ##
============================================
+ Coverage     70.71%   70.87%   +0.15%     
============================================
  Files           119      119              
  Lines         64652    64628      -24     
============================================
+ Hits          45717    45802      +85     
+ Misses        18935    18826     -109     
Files with missing lines Coverage Δ
src/multi.c 96.49% <100.00%> (+0.06%) ⬆️
src/networking.c 88.32% <100.00%> (-0.25%) ⬇️

... and 46 files with indirect coverage changes

@@ -3112,6 +3112,10 @@ int canParseCommand(client *c) {
}

int processInputBuffer(client *c) {
mstime_t latency;
latencyStartMonitor(latency);
Copy link
Member

Choose a reason for hiding this comment

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

Has the impact of gettimeofday been measured? it will be executed on every single command.

Copy link
Contributor Author

@RayaCoo RayaCoo Dec 23, 2024

Choose a reason for hiding this comment

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

I believe gettimeofday is a very lightweight operation because of vDSO.

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.

2 participants