Skip to content

redis: add latency stats for commands#5593

Merged
mattklein123 merged 16 commits intoenvoyproxy:masterfrom
ramaraochavali:fix/redis_latency_stats
Jan 23, 2019
Merged

redis: add latency stats for commands#5593
mattklein123 merged 16 commits intoenvoyproxy:masterfrom
ramaraochavali:fix/redis_latency_stats

Conversation

@ramaraochavali
Copy link
Contributor

Description: Adds latency stats for each command.
Risk Level: Low
Testing: Added automated tests
Docs Changes: Updated
Release Notes: Added
Fixes #5591

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>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
@ramaraochavali
Copy link
Contributor Author

@danielhochman can you PTAL when you get chance?

} else {
command_stats_.error_.inc();
}
std::chrono::milliseconds latency = std::chrono::duration_cast<std::chrono::milliseconds>(
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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>
@ramaraochavali
Copy link
Contributor Author

@HenryYYang @danielhochman can you PTAL when you get chance?

@HenryYYang
Copy link
Contributor

HenryYYang commented Jan 22, 2019

+1. Looks good to me.

HenryYYang
HenryYYang previously approved these changes Jan 22, 2019
@mattklein123 mattklein123 self-assigned this Jan 23, 2019
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

LGTM, one small request. Thank you!

/wait

Stats::Counter& total_;
Stats::Counter& success_;
Stats::Counter& error_;
Stats::Histogram& latency_;
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem. Switched over to macros. PTAL

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
@ramaraochavali
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

🔨 rebuilding ci/circleci: mac (failed build)

🐱

Caused by: a #5593 (comment) was created by @ramaraochavali.

see: more, trace.

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thank you!

@mattklein123 mattklein123 merged commit 18a57f2 into envoyproxy:master Jan 23, 2019
@ramaraochavali ramaraochavali deleted the fix/redis_latency_stats branch January 23, 2019 16:44
danzh2010 pushed a commit to danzh2010/envoy that referenced this pull request Jan 24, 2019
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>

Signed-off-by: Dan Zhang <danzh@google.com>
danzh2010 pushed a commit to danzh2010/envoy that referenced this pull request Jan 31, 2019
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>

Signed-off-by: Rama Chavali <ramaraochavali@gmail.com>
fredlas pushed a commit to fredlas/envoy that referenced this pull request Mar 5, 2019
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Fred Douglas <fredlas@google.com>
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.

4 participants