public class MercuryProducerController
extends MercuryBase
PerfProducer sends an x no of messages in warmup mode and wait for a confirmation
from the consumer that it has successfully consumed them and ready to start the
test. It will start sending y no of messages and each message will contain a time
stamp. This will be used at the receiving end to measure the latency.
This is done with the assumption that both consumer and producer are running on
the same machine or different machines which have time synced using a time server.
This test also calculates the producer rate as follows.
rate = msg_count/(time_before_sending_msgs - time_after_sending_msgs)
All throughput rates are given as msg/sec so the rates are multiplied by 1000.
Rajith - Producer rate is not an accurate perf metric IMO.
It is heavily inlfuenced by any in memory buffering.
System throughput and latencies calculated by the PerfConsumer are more realistic
numbers.
Answer by rajith : I agree about in memory buffering affecting rates. But Based on test runs
I have done so far, it seems quite useful to compute the producer rate as it gives an
indication of how the system behaves. For ex if there is a gap between producer and consumer rates
you could clearly see the higher latencies and when producer and consumer rates are very close,
latency is good.