Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spaces in parameters #204

Open
nik9000 opened this issue Aug 30, 2021 · 1 comment
Open

spaces in parameters #204

nik9000 opened this issue Aug 30, 2021 · 1 comment

Comments

@nik9000
Copy link

nik9000 commented Aug 30, 2021

Describe the bug
Parameters to JMH with spaces in them leak to the rest of the command line.

To Reproduce
Add jmh plugin and then add a configuration like:

jmh {
  val input : ListProperty<String> = project.objects.listProperty()
  input.value(listOf("two words"))
  benchmarkParameters.put("input", input)
}

Running ./gradlew jmh spits out:

> Task :exp:jmh FAILED
No matching benchmarks. Miss-spelled regexp?
Use EXTRA verbose mode to debug the pattern matching.

Running with -info says this is the command we're running:

java -cp <12343 characters> org.openjdk.jmh.Main -foe 0 -gc 0  -p input=two words -rf text -rff <path>/build/results/jmh/results.txt
@nik9000
Copy link
Author

nik9000 commented Sep 6, 2021

OH! It's not spaces - or, might not be. When I replace the -p bit with something single word I still don't start. Same error. Here's what --info spits out:

/usr/lib/jvm/java-16-openjdk/bin/java -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/home/username/Code/nexp/exp/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant -cp /home/username/.gradle/caches/modules-2/files-2.1/org.openjdk.jmh/jmh-generator-bytecode/1.28/7db81ae7bf1e13bc4547e5974ab7d1cc9a7bd337/jmh-generator-bytecode-1.28.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.openjdk.jmh/jmh-generator-asm/1.28/1f04eb66c481228df7a1e0474c3b3fb458b0f7a6/jmh-generator-asm-1.28.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.openjdk.jmh/jmh-generator-reflection/1.28/98ef395824e1925c352cc962e71376a81a892a92/jmh-generator-reflection-1.28.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.openjdk.jmh/jmh-core/1.28/5be859dee27a80704efa99cae9017818d7d39f58/jmh-core-1.28.jar:/home/username/.gradle/caches/modules-2/files-2.1/net.sf.jopt-simple/jopt-simple/4.6/306816fb57cf94f108a43c95731b08934dcae15c/jopt-simple-4.6.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-math3/3.2/ec2544ab27e110d2d431bdad7d538ed509b21e62/commons-math3-3.2.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/9.0/af582ff60bc567c42d931500c3fdc20e0141ddf9/asm-9.0.jar:/home/username/Code/nexp/exp/build/libs/exp-0.0.1-jmh.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.antlr/antlr4/4.9.2/a34d0bb512c1bd54d1d59cced3f7cbc0b0d1a495/antlr4-4.9.2.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest/2.2/1820c0968dba3a11a1b30669bb1f01978a91dedc/hamcrest-2.2.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-engine/1.8.0-M1/ec6b09bebb1f08ab88ac3067e84a2c37abac0f47/junit-platform-engine-1.8.0-M1.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-commons/1.8.0-M1/606bc745051c0c2a608700d91a40d8a94698cdab/junit-platform-commons-1.8.0-M1.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-engine/5.8.0-M1/7c9a3128baf19144a4dceb1d02e697384db8b2b4/junit-jupiter-engine-5.8.0-M1.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-api/5.8.0-M1/6d6a0e5ee7373eaebba6a7357c36a468e490b47b/junit-jupiter-api-5.8.0-M1.jar:/home/username/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.8.6/9180733b7df8542621dc12e21e87557e8c99b8cb/gson-2.8.6.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.antlr/antlr4-runtime/4.9.2/ece33ec76e002dfde574cf7b57451a91a99185c5/antlr4-runtime-4.9.2.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.antlr/ST4/4.3/92f2c1ad8d84abcbeead6cf7f2c53a04166293c2/ST4-4.3.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.antlr/antlr-runtime/3.5.2/cd9cd41361c155f3af0f653009dcecb08d8b4afd/antlr-runtime-3.5.2.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.abego.treelayout/org.abego.treelayout.core/1.0.3/457216e8e6578099ae63667bb1e4439235892028/org.abego.treelayout.core-1.0.3.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.glassfish/javax.json/1.0.4/3178f73569fd7a1e5ffc464e680f7a8cc784b85a/javax.json-1.0.4.jar:/home/username/.gradle/caches/modules-2/files-2.1/com.ibm.icu/icu4j/61.1/28d33b5e44e72edcc66a5da7a34a42147f38d987/icu4j-61.1.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.apiguardian/apiguardian-api/1.1.1/7ea550039f115fcc40990925490b8ebd4b93024a/apiguardian-api-1.1.1.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.opentest4j/opentest4j/1.2.0/28c11eb91f9b6d8e200631d46e20a7f407f2a046/opentest4j-1.2.0.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.4.20/756521338269950c2a276f1abe6fef8e1a5e5528/kotlin-stdlib-jdk8-1.4.20.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.4.20/9de2c79e95d4b4699a455e88ba285a95352e0bea/kotlin-stdlib-jdk7-1.4.20.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.4.20/9be77b243a362b745e365f286627b8724337009c/kotlin-stdlib-1.4.20.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.4.20/c6761d7805b5312302f2bbd78cda68c976ce0c70/kotlin-stdlib-common-1.4.20.jar:/home/username/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar org.openjdk.jmh.Main -foe 0 -gc 0  -p input=apache_license -rf text -rff /home/username/Code/thing/thingbuild/results/jmh/results.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant