From 6fc981e13d11545f838c23e1ea17d20af5d3107e Mon Sep 17 00:00:00 2001 From: "rick.parker" Date: Wed, 15 Nov 2017 15:16:14 +0000 Subject: [PATCH] Add some comments and clean up. --- .../jmeter/src/main/kotlin/com/r3/corda/jmeter/Launcher.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/jmeter/src/main/kotlin/com/r3/corda/jmeter/Launcher.kt b/tools/jmeter/src/main/kotlin/com/r3/corda/jmeter/Launcher.kt index b45302471f..d1ebfcca23 100644 --- a/tools/jmeter/src/main/kotlin/com/r3/corda/jmeter/Launcher.kt +++ b/tools/jmeter/src/main/kotlin/com/r3/corda/jmeter/Launcher.kt @@ -8,6 +8,11 @@ import java.nio.file.Files import java.nio.file.Paths import kotlin.streams.asSequence +/** + * A wrapper around JMeter to make it run without having a JMeter download installed locally. One mode is used for + * running on a remote cluster using an all-in-one bundle JAR using Capsule. The other is just used to run based on current + * classpath, but with optional SSH tunnelling logic automatically invoked. + */ class Launcher { companion object { @JvmStatic @@ -50,6 +55,8 @@ class Launcher { } private fun maybeOpenSshTunnels(args: Array): Array { + // We trim the args at the point "-Xssh" appears in the array of args. Anything after that is a host to + // SSH tunnel to. var index = 0 for (arg in args) { if (arg == "-Xssh") {