Caliper 因“错误:无法找到或加载主类”而失去了对工作线程的跟踪
我正在尝试运行 Caliper,但遇到了可怕的基准死亡异常:
java.lang.RuntimeException: Got no response!
at com.google.caliper.runner.CaliperRun.measure(CaliperRun.java:241)
at com.google.caliper.runner.CaliperRun.run(CaliperRun.java:132)
at com.google.caliper.runner.CaliperMain.exitlessMain(CaliperMain.java:88)
at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:58)
at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:47)
at FastBigBenchmark.main(bench.mirah:22)
CaliperRun 中的错误日志包含“错误:无法找到或加载主类”,但没有堆栈跟踪或任何其他有用的内容。
从堆栈跟踪中可以看出,我正在使用 Mirah 生成基准类,但在您怀疑 Mirah 是问题之前,这里是我的基准类中生成的 javap 反编译的 main 方法:(
public static void main(java.lang.String[]);
Code:
0: ldc #2 // class FastBigBenchmark
2: aload_0
3: invokestatic #36 // Method com/google/caliper/runner/CaliperMain.main:(Ljava/lang/Class;[Ljava/lang/String;)V
6: return
您可以看到它存在也在堆栈跟踪中。)
有关从哪里开始挖掘以调试此问题的任何提示?我不知道这个问题在 Caliper 中可能源于何处。
I'm trying to run Caliper, but I got the dreaded benchmark death exception:
java.lang.RuntimeException: Got no response!
at com.google.caliper.runner.CaliperRun.measure(CaliperRun.java:241)
at com.google.caliper.runner.CaliperRun.run(CaliperRun.java:132)
at com.google.caliper.runner.CaliperMain.exitlessMain(CaliperMain.java:88)
at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:58)
at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:47)
at FastBigBenchmark.main(bench.mirah:22)
The errorLog in CaliperRun contains "Error: Could not find or load main class", but doesn't have a stack trace or anything else useful.
As you can tell from the stack trace, I'm using Mirah to generate the benchmark class, but before you suspect Mirah is the problem, here is the javap-decompiled main method generated in my benchmark class:
public static void main(java.lang.String[]);
Code:
0: ldc #2 // class FastBigBenchmark
2: aload_0
3: invokestatic #36 // Method com/google/caliper/runner/CaliperMain.main:(Ljava/lang/Class;[Ljava/lang/String;)V
6: return
(You can see that this exists in the stack trace, too.)
Any tip on where to start digging to debug this problem? I don't know where this problem might be originating from in Caliper.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论