• 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:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

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: 9092
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!