I am getting ConfigurationException(agent library failed) when I turn on measureMemory parameter in Tutorial.java from Caliper source (http://code.google.com/p/caliper/source/browse/#svn%2Ftrunk%2Ftutorial)
Not sure what I am missing. I have built caliper jar locally. Without this parameter everything works great. I would like to see how memory my operation consumes
bash-3.2$ java -javaagent:/Users/ndchandar/CCRC/libs/allocation.jar -cp /Users/ndchandar/CCRC/libs/guava-r09.jar:/Users/ndchandar/CCRC/libs/gson-2.1.jar:/Users/ndchandar/CCRC/libs/asm-3.3.jar:/Users/ndchandar/CCRC/libs/asm-analysis-3.3.jar:/Users/ndchandar/CCRC/libs/allocation.jar:/Users/ndchandar/CCRC/libs/jsr305.jar:/Users/ndchandar/CCRC/libs/jarjar-1.0rc8.jar:/Users/ndchandar/CCRC/libs/caliper-1.0-SNAPSHOT.jar:target/test-classes com.google.caliper.Runner com.mycompany.perf.Tutorial.Benchmark1 -Dlength=1,10 --measureMemory
0% Scenario{vm=java, trial=0, benchmark=NanoTime}json in read method of InterleavedReader => {"measurements":[{"raw":55.240640625951315,"processed":55.240640625951315,"unitNames":{"ns":1,"s":1000000000,"ms":1000000,"us":1000}},{"raw":54.34121282152953,"processed":54.34121282152953,"unitNames":{"ns":1,"s":1000000000,"ms":1000000,"us":1000}},{"raw":54.94355677030953,"processed":54.94355677030953,"unitNames":{"ns":1,"s":1000000000,"ms":1000000,"us":1000}}],"unitNames":{"ns":1,"s":1000000000,"ms":1000000,"us":1000},"systemOutCharCount":0,"systemErrCharCount":0}
Failed to execute java -javaagent:null -cp /Users/ndchandar/CCRC/libs/guava-r09.jar:/Users/ndchandar/CCRC/libs/gson-2.1.jar:/Users/ndchandar/CCRC/libs/asm-3.3.jar:/Users/ndchandar/CCRC/libs/asm-analysis-3.3.jar:/Users/ndchandar/CCRC/libs/allocation.jar:/Users/ndchandar/CCRC/libs/jsr305.jar:/Users/ndchandar/CCRC/libs/jarjar-1.0rc8.jar:/Users/ndchandar/CCRC/libs/caliper-1.0-SNAPSHOT.jar:target/test-classes:/Users/ndchandar/CCRC/libs/allocation.jar com.google.caliper.InProcessRunner --warmupMillis 3000 --runMillis 1000 --measurementType INSTANCE --marker //ZxJ/ -Dbenchmark=NanoTime com.mycompany.perf.Tutorial.Benchmark1
Error opening zip file or JAR manifest missing : null
Error occurred during initialization of VM
agent library failed to init: instrument
An exception was thrown from the benchmark code.
com.google.caliper.ConfigurationException: Failed to execute java -javaagent:null -cp /Users/ndchandar/CCRC/libs/guava-r09.jar:/Users/ndchandar/CCRC/libs/gson-2.1.jar:/Users/ndchandar/CCRC/libs/asm-3.3.jar:/Users/ndchandar/CCRC/libs/asm-analysis-3.3.jar:/Users/ndchandar/CCRC/libs/allocation.jar:/Users/ndchandar/CCRC/libs/jsr305.jar:/Users/ndchandar/CCRC/libs/jarjar-1.0rc8.jar:/Users/ndchandar/CCRC/libs/caliper-1.0-SNAPSHOT.jar:target/test-classes:/Users/ndchandar/CCRC/libs/allocation.jar com.google.caliper.InProcessRunner --warmupMillis 3000 --runMillis 1000 --measurementType INSTANCE --marker //ZxJ/ -Dbenchmark=NanoTime com.mycompany.perf.Tutorial.Benchmark1
at com.google.caliper.Runner.measure(Runner.java:310)
at com.google.caliper.Runner.runScenario(Runner.java:236)
at com.google.caliper.Runner.runOutOfProcess(Runner.java:379)
at com.google.caliper.Runner.run(Runner.java:98)
at com.google.caliper.Runner.main(Runner.java:424)
Thanks, Dinesh
I had to define ALLOCATION_JAR as mentioned in http://code.google.com/p/caliper/issues/detail?id=114&sort=-id. Have tested this in CentOS-6 and Mac OSX 10.7.2