slachiewicz / caliper

Automatically exported from code.google.com/p/caliper
Apache License 2.0
0 stars 0 forks source link

JsonReader parsing error while benchmarking #145

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have a benchmark class, which loads manually web app spring app context, 
then calls the service method to benchmark its performence.
2. while loading thows 
com.google.caliper.internal.gson.stream.MalformedJsonException: Use 
JsonReader.setLenient(true) to accept malformed JSON near   error
3. why this is so, and how can it be resolved?

What is the expected output? What do you see instead?
expected output should be to benchmarking shud be executed properly

What version of the product are you using? On what operating system?
caliper latest from code google

Please provide any additional information below.
files are attached

Original issue reported on code.google.com by naveendu...@gmail.com on 11 Jan 2012 at 5:13

Attachments:

GoogleCodeExporter commented 9 years ago
Can you include the full stacktrace?

Original comment by limpbizkit on 11 Jan 2012 at 5:56

GoogleCodeExporter commented 9 years ago
Hi, here is the stacktrace -

com.google.caliper.internal.gson.JsonSyntaxException: 
com.google.caliper.internal.gson.stream.MalformedJsonException: Use 
JsonReader.setLenient(true) to accept malformed JSON near  
-Dbenchmark=getProductFamilies c
    at com.google.caliper.internal.gson.JsonParser.parse(JsonParser.java:64)
    at com.google.caliper.internal.gson.JsonParser.parse(JsonParser.java:44)
    at com.google.caliper.util.InterleavedReader.read(InterleavedReader.java:95)
    at com.google.caliper.Runner.measure(Runner.java:289)
    at com.google.caliper.Runner.runScenario(Runner.java:230)
    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)
    at com.google.caliper.Runner.main(Runner.java:441)
    at com.brocade.webportal.user.service.MyProductSurveyBenchmark.main(MyProductSurveyBenchmark.java:36)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:599)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: com.google.caliper.internal.gson.stream.MalformedJsonException: Use 
JsonReader.setLenient(true) to accept malformed JSON near  
-Dbenchmark=getProductFamilies c
    at com.google.caliper.internal.gson.stream.JsonReader.syntaxError(JsonReader.java:1111)
    at com.google.caliper.internal.gson.stream.JsonReader.checkLenient(JsonReader.java:892)
    at com.google.caliper.internal.gson.stream.JsonReader.nextLiteral(JsonReader.java:988)
    at com.google.caliper.internal.gson.stream.JsonReader.readLiteral(JsonReader.java:1077)
    at com.google.caliper.internal.gson.stream.JsonReader.nextValue(JsonReader.java:808)
    at com.google.caliper.internal.gson.stream.JsonReader.quickPeek(JsonReader.java:382)
    at com.google.caliper.internal.gson.stream.JsonReader.peek(JsonReader.java:340)
    at com.google.caliper.internal.gson.JsonParser.parse(JsonParser.java:59)
    ... 14 more

Original comment by naveendu...@gmail.com on 11 Jan 2012 at 6:14

GoogleCodeExporter commented 9 years ago
Hi, any luck on this? can you please let me know what could be the issue behind 
this?

Original comment by naveendu...@gmail.com on 11 Jan 2012 at 7:31

GoogleCodeExporter commented 9 years ago
??

Original comment by naveendu...@gmail.com on 12 Jan 2012 at 5:33

GoogleCodeExporter commented 9 years ago
Something bad is clearly happening. Are you using the latest code from SVN?

Original comment by jessewil...@google.com on 12 Jan 2012 at 3:39

GoogleCodeExporter commented 9 years ago
Yes, however this issue got solve, because my logger level were set to DEBUG 
and hence json was not able to parse it. also some guava depenedecy needed to 
be set in pom.xml of caliper.

do you ahve any idea about this error while running the benchmark, works fine 
for reps = 1, but not for more than that?

Error: Runtime 1.016145376E10ns/rep out of range 0.1-1.0E10 

Original comment by naveendu...@gmail.com on 12 Jan 2012 at 3:45

GoogleCodeExporter commented 9 years ago
Caliper is a microbenchmarking framework. If your benchmarks take more than a 
second to run, Caliper isn't going to do a very good job. You can hack around 
this by changing the limits in Caliper's source code.

Original comment by limpbizkit on 13 Jan 2012 at 2:20

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 8 Feb 2012 at 9:53