public class TestComponentsLogger extends java.lang.Object implements ComponentsLogger
ComponentsLogger.LogLevel
Constructor and Description |
---|
TestComponentsLogger() |
Modifier and Type | Method and Description |
---|---|
void |
cancelPerfEvent(PerfEvent event)
Release a previously obtained
PerfEvent without logging it. |
java.util.List<PerfEvent> |
getCanceledPerfEvents() |
java.util.Map<java.lang.String,java.lang.String> |
getExtraAnnotations(TreeProps treeProps)
Provide additional log metadata based on the tree props of the component hierarchy currently
being logged.
|
java.util.List<PerfEvent> |
getLoggedPerfEvents() |
boolean |
isTracing(PerfEvent logEvent) |
void |
logPerfEvent(PerfEvent event)
Write a
PerfEvent to storage. |
PerfEvent |
newPerformanceEvent(ComponentContext c,
int eventId)
Create a new performance event with the given event id and start counting the time.
|
void |
reset() |
public boolean isTracing(PerfEvent logEvent)
isTracing
in interface ComponentsLogger
public PerfEvent newPerformanceEvent(ComponentContext c, int eventId)
ComponentsLogger
newPerformanceEvent
in interface ComponentsLogger
public void cancelPerfEvent(PerfEvent event)
ComponentsLogger
PerfEvent
without logging it.cancelPerfEvent
in interface ComponentsLogger
public void logPerfEvent(PerfEvent event)
ComponentsLogger
PerfEvent
to storage. This also marks the end of the event.logPerfEvent
in interface ComponentsLogger
public java.util.List<PerfEvent> getLoggedPerfEvents()
public java.util.List<PerfEvent> getCanceledPerfEvents()
public void reset()
public java.util.Map<java.lang.String,java.lang.String> getExtraAnnotations(TreeProps treeProps)
ComponentsLogger
getExtraAnnotations
in interface ComponentsLogger
treeProps
- The treeprops available in the hierarchy.