Update of /cvsroot/javaprofiler/library/demo/06
In directory usw-pr-cvs1:/tmp/cvs-serv21262/demo/06
Modified Files:
Test.java
Log Message:
calltree example
Index: Test.java
===================================================================
RCS file: /cvsroot/javaprofiler/library/demo/06/Test.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Test.java 31 Jan 2002 12:31:03 -0000 1.1
--- Test.java 28 Feb 2002 10:19:50 -0000 1.2
***************
*** 57,76 ****
IProf.THREADS, true);
! IProf.sID sid = (IProf.sID)iterator.next();
! // ask for more info
! IProf.sThreadInfo sti =
(IProf.sThreadInfo)iprof.getInfo( sid.infoId,
IProf.THREAD_INFO);
! System.out.println( "thread: " + sti.threadName);
! System.out.println( "info ID: " + sid.infoId);
! System.out.println( "object ID: " + sid.objId);
! // now, ask for calltree of this thread
! IProf.sCallTree ct = iprof.getCallTree( sid.objId);
! if( ct == null)
System.out.println( "calltree is empty !");
// now, i don't want anything else,
--- 57,85 ----
IProf.THREADS, true);
! while( iterator.hasNext()) {
! IProf.sID sid = (IProf.sID)iterator.next();
!
! // ask for more info
! IProf.sThreadInfo sti =
(IProf.sThreadInfo)iprof.getInfo( sid.infoId,
IProf.THREAD_INFO);
! System.out.println( "thread: " +sti.threadName);
! System.out.println( "info ID: " + sid.infoId);
! System.out.println( "object ID: " + sid.objId);
! // now, ask for calltree of this thread
! IProf.sCallTree ct =
! iprof.getCallTree( sid.objId);
! if( ct == null)
System.out.println( "calltree is empty !");
+ else
+ System.out.println( "okay, #items = "
+ + ct.numOfItems);
+
+ System.out.println();
+ }
// now, i don't want anything else,
|