Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Java Code Preformance Testing

Options
  • 13-09-2005 12:58pm
    #1
    Moderators, Sports Moderators Posts: 8,679 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,679 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 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