private static class MethodTraceAspect.BucketData extends java.lang.Object implements MethodTraceAspect.ElapsedTimeable
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,MethodTraceAspect.TraceBucket> |
bucketData
Map of bucket names to buckets of trace data
|
private long |
elapsed
Elapsed time of the root method call, including all its nested calls
|
Constructor and Description |
---|
BucketData()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addTrace(java.lang.String bucket,
MethodTraceAspect.TraceData trace,
boolean transition,
boolean isRoot)
Add aggregated trace data for all calls to a particular method to the given bucket.
|
(package private) java.util.List<MethodTraceAspect.TraceData[]> |
asRows()
Return all the stored traces across buckets as rows.
|
long |
getElapsed()
Get the elapsed time of the longest bucket.
|
(package private) MethodTraceAspect.TraceBucket |
getTraces(java.lang.String bucket)
Get the trace data for the given bucket.
|
(package private) java.util.Iterator<MethodTraceAspect.TraceBucket> |
traces()
Get an iterator on the trace buckets.
|
private final java.util.Map<java.lang.String,MethodTraceAspect.TraceBucket> bucketData
private long elapsed
void addTrace(java.lang.String bucket, MethodTraceAspect.TraceData trace, boolean transition, boolean isRoot)
bucket
- Name of bucket.trace
- Aggregated trace data for a method.transition
- true
if the method call captured by this trace represents a call into
this bucket from another or from an untraced caller, else false
.isRoot
- true
if this trace represents the root (first traced) method, else
false
. A root method may call zero or more other traced methods.
There can be only one (and there must be one) root trace per bucket data
instance. Any other traces represent nested method calls in a graph originating
from the root method.public long getElapsed()
getElapsed
in interface MethodTraceAspect.ElapsedTimeable
MethodTraceAspect.TraceBucket getTraces(java.lang.String bucket)
bucket
- Name of bucket.java.util.Iterator<MethodTraceAspect.TraceBucket> traces()
java.util.List<MethodTraceAspect.TraceData[]> asRows()
TraceData
objects. The number of elements in the array matches the number of buckets
into which the data is being organized. Since the buckets may contain a varying number
of traces, null
is inserted into the array in place of a missing trace.
There is no implied, direct caller to callee relationship between the methods across the columns of any particular row.
TraceData
arrays. The number of rows matches the number of
traces in the largest bucket.