Some clean up. Remote slave via capsule is working.

This commit is contained in:
rick.parker 2017-11-02 14:58:47 +00:00
parent 18cca32d11
commit 029cc1c2f0

View File

@ -1,13 +1,23 @@
package net.corda.jmeter
import org.apache.jmeter.JMeter
import org.slf4j.LoggerFactory
class Launcher {
companion object {
@JvmStatic
fun main(args: Array<String>) {
val logger = LoggerFactory.getLogger(this::class.java)
val jmeter = JMeter()
val capsuleDir = System.getProperty("capsule.dir")
if (capsuleDir != null) {
// We are running under Capsule, so assume we want a JMeter distributed server to be controlled from
// elsewhere.
logger.info("Starting JMeter in server mode from $capsuleDir")
jmeter.start(arrayOf("-s", "-d", capsuleDir, "-p", "$capsuleDir/jmeter.properties") + args)
} else {
jmeter.start(args)
}
}
}
}