Repository navigation
Conversation
…ds, and a negative latency no longer throws out of onMessage
|
I understand the change.. but I believe perf client is not supposed to run in parallel with producer and consumer, right? Also: the new storage I'm working on will highly benefit from parallel queues, parallel producers... we should find a way to measure that. |
|
Not in parallel, no. It was sequential: If you don't want to support that mix, the negative latency handling still seems worth having: wall clocks can differ between hosts, so For parallel queues and producers, the connection tests I posted on #6838 are one way to measure it: |
perf clientstamps and reads message times withSystem.nanoTime(), whileperf producerandperf consumeruse theMicrosClockwall clock. Whenperf clientconsumes messages sent byperf producer, the latency comes out negative, the histogram throws out ofonMessage, and the message is redelivered. The run stalls and never ends.All three commands now take their clock from
MicrosClock.timeProvider, including the fallback and its warning. It has to be the wall clock, as it's the only one that means anything across processes.perf clientlatencies are therefore measured on the wall clock now, like those of the other two commands.Wall clocks can still differ between hosts or step back, so a negative latency is now recorded as 0 instead of throwing, for the receive latency and for the send latency.
MessageListenerBenchmarkTestchecks a message stamped ahead of the receiver's clock and one stamped behind it. The first fails without the fix, withHistogram recorded value cannot be negative.Tested against a broker built from main, changing only the CLI jar, with 100000 messages sent by
perf producer --persistent --message-count 100000, thenperf client --persistent --duration 20 --warmup 5on the same queue:https://issues.apache.org/jira/browse/ARTEMIS-6355