Minor fix for Paho perf groovy scripts

This commit is contained in:
andrea
2015-06-02 16:37:01 +02:00
parent d1a8a79525
commit 1eb47dec6a
4 changed files with 18 additions and 4 deletions
@@ -0,0 +1,7 @@
package org.eclipse.moquette.parser.netty.performance;
/**
* Created by andrea on 6/2/15.
*/
public class LoopHandler {
}
@@ -0,0 +1,7 @@
package org.eclipse.moquette.parser.netty.performance;
/**
* Created by andrea on 6/2/15.
*/
public class ProtocolDecodingServer {
}
@@ -25,7 +25,7 @@ MqttClient client = new MqttClient("tcp://${host}:1883", "PublisherClient", data
//connOptions.password = 'password' as char[] //connOptions.password = 'password' as char[]
//Only for Apollo --- //Only for Apollo ---
//client.connect(connOptions) //client.connect(connOptions)
client.connect(connOptions) client.connect()
MqttMessage message = new MqttMessage('Hello world!!'.bytes) MqttMessage message = new MqttMessage('Hello world!!'.bytes)
message.setQos(0) message.setQos(0)
print "publishing..${numToSend} messages, " print "publishing..${numToSend} messages, "
@@ -39,7 +39,6 @@ class SubscriberCallback implements MqttCallback {
long spentTime = stopTime - m_startTime long spentTime = stopTime - m_startTime
println "/exit received" println "/exit received"
println "subscriber disconnected, received ${m_numReceived} messages in ${spentTime} ms" println "subscriber disconnected, received ${m_numReceived} messages in ${spentTime} ms"
client.disconnect()
m_latch.countDown() m_latch.countDown()
} else { } else {
//println "-received ${message} on ${topic} with QoS ${message.qos}" //println "-received ${message} on ${topic} with QoS ${message.qos}"
@@ -79,3 +78,4 @@ client.subscribe("/exit", 0)
println "subscribed to /exit" println "subscribed to /exit"
callback.waitFinish() callback.waitFinish()
client.diconnect()