-
Notifications
You must be signed in to change notification settings - Fork 812
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
Conversation
common/metrics/fake.go
Outdated
@@ -0,0 +1,36 @@ | |||
// Copyright (c) 2017 Uber Technologies, Inc. |
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.
could you change this file name to noop.go?
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.
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() |
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.
noop?
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.
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 |
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.
you can also make this struct implement messaging.Message and make the implemented ack / nack call stopwatch.stop
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.
updated, I think your suggestion is cleaner
I also contains a small refactor of archival tests