redis: add latency stats for commands#5593
Conversation
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
|
@danielhochman can you PTAL when you get chance? |
| } else { | ||
| command_stats_.error_.inc(); | ||
| } | ||
| std::chrono::milliseconds latency = std::chrono::duration_cast<std::chrono::milliseconds>( |
There was a problem hiding this comment.
I see that there's a Timespan class in Envoy.Stats that does the same thing. Maybe we should use that so that it's more consistent.
There was a problem hiding this comment.
OK. Changed to use Timespan class. PTAL.
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
|
@HenryYYang @danielhochman can you PTAL when you get chance? |
|
+1. Looks good to me. |
mattklein123
left a comment
There was a problem hiding this comment.
LGTM, one small request. Thank you!
/wait
| Stats::Counter& total_; | ||
| Stats::Counter& success_; | ||
| Stats::Counter& error_; | ||
| Stats::Histogram& latency_; |
There was a problem hiding this comment.
Can you potentially switch this over to using the stats macros so its consistent with everywhere else? Sorry I thought about asking this on the previous PR, but if we keep adding stats it's probably worth it to do so now.
There was a problem hiding this comment.
No problem. Switched over to macros. PTAL
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
|
/retest |
|
🔨 rebuilding |
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com> Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com> Signed-off-by: Rama Chavali <ramaraochavali@gmail.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com> Signed-off-by: Fred Douglas <fredlas@google.com>
Description: Adds latency stats for each command.
Risk Level: Low
Testing: Added automated tests
Docs Changes: Updated
Release Notes: Added
Fixes #5591