ca.jimr.gae.profiler
Class MiniProfiler.Profile

java.lang.Object
  extended by ca.jimr.gae.profiler.MiniProfiler.Profile
All Implemented Interfaces:
Serializable
Enclosing class:
MiniProfiler

protected static class MiniProfiler.Profile
extends Object
implements Serializable

Contains information about a profiling step

See Also:
Serialized Form

Constructor Summary
MiniProfiler.Profile(int id, String name)
           
 
Method Summary
 void addChild(MiniProfiler.Profile child)
          Add a child step to this step.
 List<MiniProfiler.Profile> getChildren()
          Get the child steps of this step.
 int getDepth()
          Get the depth of the step in the profiling tree.
 long getDuration()
          Get how long the step tool (nanoseconds).
 long getId()
          The id of the step.
 String getName()
          Get the name of the step.
 long getOffset()
          Get the step's offset from the start of profling (nanoseconds).
 long getSelf()
          Calculate the duration of this step, minus the duration of all the child steps.
 long getStart()
          Get when the step started (nanoseconds).
 void setDepth(int depth)
          Set the depth of the step in the profiling tree.
 void setDuration(long duration)
          Set how long the step took (nanoseconds).
 void setOffset(long offset)
          Set the step's offset from the start of profiling (nanoseconds).
 void setStart(long start)
          Set when the step started (nanoseconds).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiniProfiler.Profile

public MiniProfiler.Profile(int id,
                            String name)
Method Detail

getId

public long getId()
The id of the step. This is used in the UI to uniquely identify steps in-order.

Returns:
The id of the step.

getDepth

public int getDepth()
Get the depth of the step in the profiling tree. This is used in the UI to determine indentation.

Returns:
The depth.

setDepth

public void setDepth(int depth)
Set the depth of the step in the profiling tree.

Parameters:
depth - The depth.

getName

public String getName()
Get the name of the step.

Returns:
The name.

getStart

public long getStart()
Get when the step started (nanoseconds).

Returns:
When the step started.

setStart

public void setStart(long start)
Set when the step started (nanoseconds).

Parameters:
start - When the step started.

setDuration

public void setDuration(long duration)
Set how long the step took (nanoseconds).

Parameters:
duration - The duration.

getDuration

public long getDuration()
Get how long the step tool (nanoseconds).

Returns:
The duration.

setOffset

public void setOffset(long offset)
Set the step's offset from the start of profiling (nanoseconds).

Parameters:
offset - The offset.

getOffset

public long getOffset()
Get the step's offset from the start of profling (nanoseconds).

Returns:
The offset.

getSelf

public long getSelf()
Calculate the duration of this step, minus the duration of all the child steps.

In effect, returns the time spent only in this step.

Returns:
The time spent just in this step (none of the children)

getChildren

public List<MiniProfiler.Profile> getChildren()
Get the child steps of this step.

Returns:
The child steps.

addChild

public void addChild(MiniProfiler.Profile child)
Add a child step to this step.

Parameters:
child - The child to add.


Copyright © 2011-2013. All Rights Reserved.