> Hi ,
> I profiled the following source code portion:
> 
> import java.util.concurrent.BlockingQueue;
> import java.util.concurrent.LinkedBlockingQueue;
>  
>       ...Class packet as a THREAD...
> 
> public class ServePackets extends Thread {
>     
> private Packet pkt;
>     private BlockingQueue WaitingPackets;
>      public ServePackets()
>       {
>               WaitingPackets = new LinkedBlockingQueue();
>           
>     }
>       public void ReceiveWaitingPackets(Packet p)
>     {
>           try {
>                       WaitingPackets.put(p);
>               } catch (InterruptedException e) {
>                       // TODO Auto-generated catch block
>                       e.printStackTrace();
>               }
>      }
>      public void run()
>     {         
>         try{
>               while( !lbq.isEmpty())
>               {
>                         pkt= WaitingPackets.take();
>               }
>                ....Serve packets...
>         
>               } catch (InterruptedException e) {
>                       e.printStackTrace();
>               }
> 
>       }
>       public static void main(String[] args) {
>               // TODO Auto-generated method stub
>              ServePackets Sp= new ServePackets();
>               Sp.start();
>          }
>   
>  }
> 
> Indeed I was really surprised after doing thread profiling by your TPTP 
> plugin.
> I found the following threads:
> main, destroy java VM, thread-0, reference handler,finalizer and signal 
> dispatcher.
> It's interesting in some kind of applications but in mine not.
> I want as I said previously measure waiting packets queue length as a 
> function of time, I didn't find neither servepackets thread nor  waiting 
> packets thread in TPTP thread profiling results.
> Do you have any suggestion using TPTP or even other java plugin or API? 
> please i really need your help it's a really critical work that i must do.
> Thanks.
> 

_________________________________________________________________
Lancez des recherches en toute sécurité depuis n'importe quelle page Web. 
Téléchargez GRATUITEMENT Windows Live Toolbar aujourd'hui !
http://toolbar.live.com_______________________________________________
tptp-tracing-profiling-tools-dev mailing list
tptp-tracing-profiling-tools-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/tptp-tracing-profiling-tools-dev

Reply via email to