public class TestComponentsLogger extends 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. |
List<PerfEvent> |
getCanceledPerfEvents() |
Map<String,String> |
getExtraAnnotations(TreeProps treeProps)
Provide additional log metadata based on the tree props of the component hierarchy currently
being logged.
|
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 void reset()
public Map<String,String> getExtraAnnotations(TreeProps treeProps)
ComponentsLogger
getExtraAnnotations
in interface ComponentsLogger
treeProps
- The treeprops available in the hierarchy.