-1

I've a business method implemented in two different ways. I want to analyze the performance of the implementations. How should I do this?

vvekselva
  • 803
  • 3
  • 17
  • 34

3 Answers3

1

Read about micro benchmarks here then use Caliper

Community
  • 1
  • 1
Bruno Grieder
  • 28,128
  • 8
  • 69
  • 101
0

Write a timing aspect and use something like JMeter to create a high volume test. Keep statistics on performance: min, mean, max, standard deviation, quartiles. Do Student-T test on both to see if the difference in means is significantly different.

If it's a business method, you'll need to generate sufficient scrubbed data to drive the application. It's easy if a single request is sufficient, but you'll have to write a randomized message generator if not.

That should tell you what's going on.

duffymo
  • 305,152
  • 44
  • 369
  • 561
0

Write a small app that uses that class and then you could use VisualVM to profile your class.

Matyas
  • 13,473
  • 3
  • 60
  • 73