com.endeca.infront.assembler.perf
Class TimeEvent

java.lang.Object
  extended by com.endeca.infront.assembler.perf.TimeEvent
All Implemented Interfaces:
Event

public class TimeEvent
extends Object
implements Event

An implementation of the Event interface that tracks the time spent in performing an event. This class tracks both descendant time (all time not spent in the current invocation), and self time (time spent only in the current invocation, without descendant invocations). Note that this implementation tracks time in microseconds and utilizes System.nanoTime() for timing information.


Constructor Summary
TimeEvent()
          Constructs a TimeEvent.
 
Method Summary
 EventSummary finished()
          Produce a summary of this event, for storage and further summarization.
 void resume(Event oldEvent)
          Resume this event; the old event is passed for reference.
 void suspend(Event newEvent)
          Suspend this event; the new event is passed for reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeEvent

public TimeEvent()
Constructs a TimeEvent. Note that time tracking starts immediately upon construction.

Method Detail

suspend

public void suspend(Event newEvent)
Description copied from interface: Event
Suspend this event; the new event is passed for reference.

Specified by:
suspend in interface Event
Parameters:
newEvent - the new event that now covers the scope

finished

public EventSummary finished()
Description copied from interface: Event
Produce a summary of this event, for storage and further summarization.

Specified by:
finished in interface Event
Returns:
A summary of this scope.

resume

public void resume(Event oldEvent)
Description copied from interface: Event
Resume this event; the old event is passed for reference.

Specified by:
resume in interface Event
Parameters:
oldEvent - the old event that is now out of scope


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