com.endeca.infront.assembler.perf
Class TimeSummary

java.lang.Object
  extended by com.endeca.infront.assembler.perf.TimeSummary
All Implemented Interfaces:
EventSummary

public class TimeSummary
extends Object
implements EventSummary

An implementation of EventSummary that aggregates the time recorded by one or more TimeEvents.


Nested Class Summary
static class TimeSummary.MinMaxTotalSummary
          A convenience wrapper class to store the total, min, and max time.
 
Field Summary
 TimeSummary.MinMaxTotalSummary all
          All the inclusive (descendant and self) time recorded
 int count
          The number of invocations recorded for this summary
 TimeSummary.MinMaxTotalSummary local
          All the local (non-descendant) time recorded
 
Constructor Summary
TimeSummary(long local, long all)
          Constructs a summary over a single invocation.
TimeSummary(long local, long all, int count)
          Constructs a summary over a single invocation.
 
Method Summary
 EventSummary combineWith(EventSummary other)
          Aggregate this summary with another.
 void serialize(StringBuilder builder)
          Serializes this summary into a human-readable string.
 String toString()
          Returns a human-readable representation of this summary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

count

public final int count
The number of invocations recorded for this summary


local

public final TimeSummary.MinMaxTotalSummary local
All the local (non-descendant) time recorded


all

public final TimeSummary.MinMaxTotalSummary all
All the inclusive (descendant and self) time recorded

Constructor Detail

TimeSummary

public TimeSummary(long local,
                   long all)
Constructs a summary over a single invocation. To create a summary over multiple invocations, create individual summaries for each invocation and use combineWith(EventSummary).

Parameters:
local - the time not covered by descendants of this event
all - all the time under this event

TimeSummary

public TimeSummary(long local,
                   long all,
                   int count)
Constructs a summary over a single invocation. To create a summary over multiple invocations, create individual summaries for each invocation and use combineWith(EventSummary).

Parameters:
local - the time not covered by descendants of this event
all - all the time under this event
count - the number of invocations of this event
Method Detail

combineWith

public EventSummary combineWith(EventSummary other)
Description copied from interface: EventSummary
Aggregate this summary with another. The passed EventSummary must be of the same concrete type.

Specified by:
combineWith in interface EventSummary
Parameters:
other - a summary to combine with
Returns:
A summary which aggregates this summary with the other summary provided. Implementations must return new instances.

toString

public String toString()
Returns a human-readable representation of this summary.

Overrides:
toString in class Object
Returns:
A human-readable representation of this summary

serialize

public void serialize(StringBuilder builder)
Description copied from interface: EventSummary
Serializes this summary into a human-readable string.

Specified by:
serialize in interface EventSummary
Parameters:
builder - the buffer to serialize to


Copyright © 2012, Oracle and/or its affiliates. All rights reserved.