Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Java Code Preformance Testing

  • 13-09-2005 11:58AM
    #1
    Moderators, Sports Moderators Posts: 8,683 Mod ✭✭✭✭


    Anyone done this before? I need to be able to come out with some metrics for code execution times and hopefully system resource usage. Havn't a clue how though!!

    Any help appricated.


Comments

  • Closed Accounts Posts: 3 cravendweller


    try junitperf - http://www.clarkware.com/software/JUnitPerf.html

    haven't used it but i've heard it's good. also jmeter is fairly handy: http://jakarta.apache.org/jmeter/


  • Moderators, Sports Moderators Posts: 8,683 Mod ✭✭✭✭Rew


    Both look good, im giving jmeter a whirl as I havn't done any junit testing before (wish I had might make my life easier now!)


  • Closed Accounts Posts: 324 ✭✭madramor




  • Registered Users, Registered Users 2 Posts: 5,618 ✭✭✭Civilian_Target


    Aye - used to be my part of job, but it was with the IBM Java Virtual Machine, so unless you're using that, there's only a limited amount of help I can give you.

    You need to get a Java code profiler (jprof), and it should build you a tree of your program's execution cycle, and include all the necessary info such as cycles used per rountine, and show you which sub-routines used cycles inside that routine, same for memory, yadda yadda. However, running jprof in the VM will slow your program to a crawl.

    If you're looking for more high end statistics, such as the percentage of execution time spent on each class, garbage collection statistics, memory used in the VM (divided per class) etc. without impacting overly on the run-time performance of the program, you need a tprof-based collector, theres one called Austin tprof that comes with the IBM virtual machine, but I'm sure there's an equivalent for the Sun VM out there...

    HTH


Advertisement