3 Replies Latest reply: Nov 11, 2010 1:18 PM by theoden RSS

Certainly a dumb question but...

theoden Newbie

Hello all,

 

I'm aiming to use jBoss Profiler to evaluate the efficiency and sanity of some code written here at work but i'm asking myself if the times indicated for each method / class / put what you feel is ok here, take acount of child code called when exectuting.

 

Let me explain what i mean :

 

Be a methode A calling in it's algorythme a method B, say that A takes 10 ms to run and B 5 ms. How must i interpret thoses results :

 

  • A takes in fact 5 ms and is accounted for 10 b'cause of the 5ms taken by methode B to run
  • A takes 10 ms and B 5 ms and the totale runtime is 15 ms

 

 

Thank's a lot for your input on that matter.

 

Best regards.

 

Nicolas.

  • 1. Re: Certainly a dumb question but...
    theoden Newbie

    No?! nobody can confirm or infirm how jbossProdiler computes running times?

     

    Nicolas

  • 2. Re: Certainly a dumb question but...
    Kabir Khan Master

    I have no idea, but why don't you simply measure something like this which would give you the answer:

     

    public class Test {

       public static void main(String[] args){

          a();

       }

     

       static a() throws Exception {

           Thread.sleep(1000);

           b();

       }

     

       static b() throws Exception {

          Thread.sleep(3000);

       }

    }

  • 3. Re: Certainly a dumb question but...
    theoden Newbie

    Well i fnally found some time to check it out and the answer is that the profiler's output display specific time for each methods (cas b of my cases list in first post).

     

    Thank's a lot for pointing me on something i haven't though of (cf. Kabir's post)

     

    Nicolas