Methods Summary |
---|
public void | beginItem()
beginItem("No Description"); // NOI18N
|
public void | beginItem(java.lang.String desc)
//if(currItem != null)
//Reporter.assertIt(currItem.hasEnded());
currItem = new Item(desc);
items.add(currItem);
|
public void | endItem()
Item item = getLastNotEnded();
if(item != null)
item.end();
|
private com.sun.enterprise.tools.common.util.diagnostics.Profiler$Item | getLastNotEnded()
int index = items.size();
while(--index >= 0)
{
Item item = (Item)items.get(index);
if(!item.hasEnded())
return item;
}
return null;
|
public static void | main(java.lang.String[] notUsed)
Profiler p = new Profiler();
try
{
p.beginItem("first item"); // NOI18N
Thread.sleep(3000);
p.beginItem("second item here dude whoa yowser yowser"); // NOI18N
Thread.sleep(1500);
p.endItem();
p.endItem();
System.out.println("" + p); // NOI18N
}
catch(Exception e)
{
}
|
public void | report()
|
public java.lang.String | toString()
StringBuffer sb = new StringBuffer(Item.getHeader());
sb.append("\n\n"); // NOI18N
for(Iterator iter = items.iterator(); iter.hasNext(); )
{
Item item = (Item)iter.next();
sb.append(item.toString());
sb.append("\n"); // NOI18N
}
return sb.toString();
|