0

I am running some benchmark tests for some program. Therefore, I want to know several properties from the application, like the memory usage etc.. I found the visual vm, which is definitely suitable for my application. However, I am not entirely sure if I could use it, cause I have two requirement:

  • should be included via maven
  • Should read out the memory usage for a certain time in my program, which I define over a method

During my research, I just found the visual vm application. However, are these two use cases possible with the vm?

I appreciate your answer!

Carol.Kar
  • 4,581
  • 36
  • 131
  • 264

1 Answers1

1

VisualVM is independent VM monitoring tool. Basicaly it's an application capable of monitoring local and remote jvm processes. You don't need any additional dependencies in your project to make it work. You just run this tool, attach to required process and start gather data.

If you want to gather data remotely every once in a while, create a task that will attach to your jvm process and monitor its state.

Alex
  • 7,460
  • 2
  • 40
  • 51
  • Thx for your answer! What do you exactly mean by `create a task that will attach to your jvm process and monitor its state.`. What do you mean by task? – Carol.Kar Oct 07 '14 at 07:51
  • @mrquad by task I mean scheduled script. It may be implemented in many ways based on your OS. – Alex Oct 07 '14 at 08:25