Embedded pub and sub client into same process of the plain test broker to use same nanosecs
This commit is contained in:
@@ -86,11 +86,12 @@ class BenchmarkPublisher {
|
||||
//initialize the timer
|
||||
PlatformTimer timer = PlatformTimer.detect()
|
||||
def pubCallback = new PublishCallback()
|
||||
println ""
|
||||
(1..numToSend).each {
|
||||
long nanos = System.nanoTime()
|
||||
byte[] message = "Hello world!!-${nanos}".bytes
|
||||
this.client.publish("/topic" + dialog_id, message, qos, retain, null, pubCallback)
|
||||
print ".\n"
|
||||
print '.'
|
||||
timer.sleep(pauseMicroseconds)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user