-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[testclient] Printing aggregated data when client exit #11985
Conversation
@@ -45,6 +45,7 @@ | |||
@WebSocket(maxTextMessageSize = 64 * 1024) | |||
public class SimpleTestProducerSocket { | |||
public static Recorder recorder = new Recorder(TimeUnit.SECONDS.toMillis(120000), 5); | |||
public static Recorder cumulativeRecorder = new Recorder(TimeUnit.SECONDS.toMillis(120000), 5); |
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.
I'm not sure why need to add a new field cumulativeRecorder
.
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.
Consistent with other implementations such as PerformanceProducer
, PerformanceReader
, ManagedLedgerWriter
and PerformanceConsumer
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.
It doesn’t seem to be used in SimpleTestProducerSocket
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.
I have removed this variable cumulativeRecorder
in SimpleTestProducerSocket
and directly reuse recorder
to get the aggregated data.
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.
@congbobo184 @gaoran10 Could you take a look again?
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.
LGTM
) (cherry picked from commit 3c770a1)
Motivation
Printing aggregated data includes throughput and delay when the client exits in
PerformanceClient
/ManagedLedgerWriter
Modifications
printAggregatedStats
method to print delay data in classPerformanceClient
printAggregatedThroughput
andprintAggregatedStats
in classPerformanceClient
printAggregatedThroughput
into ShutdownHook in classManagedLedgerWriter
Documentation