开发者

Evaluating one thread performance across all the methods

There is one thread which executes say 50 methods across several packages. I want to evaluate execution time for each method. This thread wakes on a signal and process this 50 method.

Answer or discussion is encouraged but please read my notes:

  1. Please do not suggest to put System.nano/mills at 开发者_开发知识库the start and at the end of each method.
  2. No profiler suggestion please.
  3. Do not suggest to mess this application with performances evaluation lines.
  4. Appreciate if someone gives an example using BTrace or ThreadMXBean or anything new.

Like to evaluate programmatically, so appreciate if anyone has better ideas.


Perf4J might be an option. I've never used it myself. But from the website they support annotating methods in order to instrument them. Live stats can be observed via MXBean, aka. jconsole or after the run in log files.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜