public interface ThreadOpTimerFactory extends OpTimerFactory
| Modifier and Type | Method and Description |
|---|---|
OpTimer |
createOpTimer(String name,
boolean captureCPUCost,
OpTimer.OnEndCallback endCallback)
This creates an OpTimer based on the passed in name and that will invoke the callback
when end is called.
|
OpRegistry |
getOpRegistry() |
List<OpSnapshot> |
snapshotAndClear()
This will snapshot the thread local
OpRegistry and clear its contents. |
OpTimer createOpTimer(String name, boolean captureCPUCost, OpTimer.OnEndCallback endCallback)
OpTimerFactorycreateOpTimer in interface OpTimerFactoryname - the name of the OpTimercaptureCPUCost - true of the CPU cost of the operation is to be capturedendCallback - a call backed to be invokd when end is called on the OpTimerOpRegistry getOpRegistry()
OpRegistry for the current threadList<OpSnapshot> snapshotAndClear()
OpRegistry and clear its contents.
You should call this say at the end of a request to get a snapshot of the counters for that request thread and then reset it for the next set of requests.
Copyright © 2016 Atlassian. All rights reserved.