Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Testing Java speed....  RSS feed

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There may be a technical term for this....I think it is called "benchmarking".

What I would like to do is test different implementations of a procees written in Java.

For example, I have the same task performed by a method of Object "A" and by a mehtod of Object "B", and I need to know the time difference in the execution between the two. Is there an effective way to do this, aside from a stopwatch?

I looking for an open source tool. I also program with Eclipse, so if there is a tool that integrates with that tool, fabulous! (Although a Google search didn't turn anything up.)

Thanks,

Landon
 
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most straightwordard way is to do it yourself from the code. For example:


If you need more detail and accuracy, you can use a profiler, such as JProbe, OptimizeIt, and countless others.
 
Sheriff
Posts: 9087
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We also have a forum named 'Performance' which deals with this sort of thing in more depth.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!