1

I have to measure the time (and memory) spend in any methods of my Java project.

I have read about several method to obtain these data. I can instrumentalized the methods. I thought to use JUnit (because I have developed several test for the project). However, I read that it does not provide the exact spend time, and I need a more concrete function that using a timeout limit. I have already used JMX in other projects, os I thought to use too.

However, I would like use a framework based on tags (like JUnit) to measure the time and the memory, but I did not find any. So, anyone know anything about this? I understand that using this way (I could have a delay).

Community
  • 1
  • 1
kiuby_88
  • 334
  • 1
  • 6
  • 18

1 Answers1

1

JProfiler is a neat tool to get a really good overview. It shows you exactly what you want. There’s a trial version. Or delivered with the JDK since version 1.6: VisualVM (jvisualvm in your JDK/bin folder). There’s also an older profiling application bundled with the JDK but it is command line only.

But none of them supports tags as far as I know. But you can filter/search at least in JProfiler.

bugybunny
  • 544
  • 5
  • 13