I am currently trying to get my way around Caliper with the few documentation available on the google code project's wiki. Having managed to run a few benchmarks, I would now like to post the results online so that I can read them a little more clearly than on the command line.
I followed the instructions on the wiki, went to the microbenchmarks.appspot.com website and copied the API key in my ".caliperrc" file. As a side note, this web page tells me that the ".caliperrc" file should be "on Windows: C:\.caliperrc" but in fact, Caliper searches in %HOME%\.caliperrc which is on windows (at least for seven) : c:\users\%login%\.caliperrc.
With this, Caliper indeed tries to upload the results... but it fails with the message "Posting to http://microbenchmarks.appspot.com:80/run/ failed: Internal Server Error". When I alter the code of the Runner.run method so that it also prints the RuntimeException's stack trace, it appears as shown below (%APIKey% in there is the String for 'APIKey' in my .caliperrc file) :
java.lang.RuntimeException: Posting to http://microbenchmarks.appspot.com:80/run/ failed.
at com.google.caliper.Runner.postResults(Runner.java:206)
at com.google.caliper.Runner.run(Runner.java:96)
at com.google.caliper.Runner.main(Runner.java:405)
at com.google.caliper.Runner.main(Runner.java:417)
at collections.ArrayListBenchmark.main(ArrayListBenchmark.java:119)
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://microbenchmarks.appspot.com:80/run/%APIKey%/collections.ArrayListBenchmark
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.google.caliper.Runner.postResults(Runner.java:200)
... 4 more
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://microbenchmarks.appspot.com:80/run/%APIKey%/collections.ArrayListBenchmark
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at com.google.caliper.Runner.postResults(Runner.java:188)
... 4 more
Am I missing a step I should have followed? If it matters, I am on windows seven 64 bits running the Caliper source code directly from svn using the following Java version :
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)
I've reported this as Caliper bug 113. As a (lame) workaround until this is fixed, you should run your JVM in a US locale. In your main method, call Locale.setDefault(Locale.US)
.