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 metrics for each visibility message to ES #2026

Merged
merged 6 commits into from
Jun 14, 2019
Merged

Conversation

vancexu
Copy link
Contributor

@vancexu vancexu commented Jun 14, 2019

I also contains a small refactor of archival tests

@@ -0,0 +1,36 @@
// Copyright (c) 2017 Uber Technologies, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

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

could you change this file name to noop.go?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed

@@ -67,7 +67,7 @@ func (r *replayMetricsClient) AddCounter(scope int, counter int, delta int64) {
// StartTimer starts a timer for the given metric name. Time will be recorded when stopwatch is stopped.
func (r *replayMetricsClient) StartTimer(scope int, timer int) tally.Stopwatch {
if workflow.IsReplaying(r.ctx) {
return nopStopwatch()
return metrics.NopStopwatch()
Copy link
Contributor

Choose a reason for hiding this comment

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

noop?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI

In computer science, a NOP, no-op, or NOOP (pronounced "no op"; short for no operation) is an assembly language instruction, programming language statement, or computer protocol command that does nothing.

@@ -64,6 +65,11 @@ type (
logger log.Logger
metricsClient metrics.Client
}

kafkaMessageWithMetrics struct { // value of esProcessorImpl.mapToKafkaMsg
Copy link
Contributor

Choose a reason for hiding this comment

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

you can also make this struct implement messaging.Message and make the implemented ack / nack call stopwatch.stop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated, I think your suggestion is cleaner

@vancexu vancexu merged commit 3efb5bc into master Jun 14, 2019
@vancexu vancexu deleted the estest branch June 14, 2019 18:44
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