Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!