简体   繁体   中英

java library to determine cpu and memory used by a program during its execution

I want to measure the level of CPU and memory utilisation of a java program, preferably with a GUI and graphs showing exact utilisation levels throughout the period of execution of the program.

Is there a library/framework that does this?

Also, i would prefer if I could measure such usage for a program(either desktop or web app) that runs on local system or remote machine.

You can use Eclipse TPTP : http://www.eclipse.org/tptp/

It contains very good tools to follow the threads as well as the memory and cpu consumption, all inside a clear GUI. As every java profiler, it can be configured to follow a remote java program.

If you're using Eclipse as your IDE, this is a natural choice.

JProfiler is good to start with. You can connect it to a local or a remote java process and profile the application to understand the memory usage and various other performance counters.

我想说VisualVM将是一个好的开始。

还可以尝试VisualVM ,它完全免费地捆绑在oracle jdk中(不了解openjdk)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM