We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(6)
看看这个问题: 您使用哪种 Java 分析工具以及您认为哪种工具最好?
Have a look to this question : Which java profiling tool do you use and which tool you think is the best ?
如果它只是您关心的一个函数,请在它周围包裹一百万次迭代循环,并用秒表计时。 然后秒转换为微秒。
另一方面,如果你想加快速度,你只需要 这个。
If it's just one function you care about, wrap a million-iteration loop around it, and time it with a stopwatch. Then seconds translate to microseconds.
On the other hand, if you want to speed it up, all you need is this.
您很幸运,因为有很多开源 Java 分析器可供您使用。
You're in luck as there are quite a few open source Java profilers available for you.
查看 Eclipse 的官方 TPTP 插件。 这几乎完成了您所描述的所有内容,并且(frikkin')还有更多。 我真的可以推荐它。
Take a look at the official TPTP plugin for Eclipse. This pretty much does all you describe and a (frikkin') whole lot more. I can really recommend it.
我不知道是否有 APIS,但您通常使用 currenttimemillis 函数来执行此操作...您在开始时测量时间,然后在执行结束时再次测量时间,瞧! 你得到了你的时间减去
I don't know if there are APIS, but you normally use the funciton currenttimemillis for that... You measure the time at the beggining, then again at the end of the execution and voila!!! you got your time substracting
Hiperic 提供了一个 GPLv2 许可的工具,用于监视所有类型的系统资源,称为 SIGAR(系统信息收集器和报告器)。
该工具用于在 GridGain(网格计算框架)中提供自适应负载平衡等功能。
http://www.hyperic.com/products/sigar.html
Hiperic provide a GPLv2 licenced tool for monitoring all sort of system resources called SIGAR (System Information Gatherer and Reporter).
This tool is used to provide things like adaptive load balancing in GridGain (a grid computing framework).
http://www.hyperic.com/products/sigar.html