public class CallTreeCallback extends CallbackSkeleton
org.javasimon.web.Controller.execute 123ms
org.javasimon.business.FirstService.work 75ms, 75%
org.javasimon.data.FirstDAO.findAll 50 ms, 82%
org.javasimon.data.SecondDAO.findByRelation 20ms, 10%, 3
org.javasimon.business.SecondService.do 10ms, 5%
CallTreeCallback.Event| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_NAME_LAST
Simon attribute name used to store last significant call tree.
|
| Constructor and Description |
|---|
CallTreeCallback()
Default constructor.
|
CallTreeCallback(LogTemplate<Split> callTreeLogTemplate)
Constructor with log template.
|
CallTreeCallback(long threshold)
Constructor with logging duration threshold.
|
| Modifier and Type | Method and Description |
|---|---|
static CallTree |
getLastCallTree(Stopwatch stopwatch)
Returns last call tree stored in stopwatch attributes.
|
Long |
getLogThreshold()
Returns log threshold when
callTreeLogTemplate is a SplitThresholdLogTemplate. |
void |
onRootStopwatchStop(CallTree callTree,
Split split)
When stopwatch corresponding to root tree node is stopped, this method is called.
|
void |
onStopwatchStart(Split split)
Stopwatch start event.
|
void |
onStopwatchStop(Split split,
StopwatchSample sample)
Stopwatch stop event.
|
void |
setLogThreshold(Long logThreshold)
Sets log threshold.
|
cleanup, initialize, onCounterDecrease, onCounterIncrease, onCounterSet, onManagerClear, onManagerMessage, onManagerWarning, onSimonCreated, onSimonDestroyed, onStopwatchAddpublic static final String ATTR_NAME_LAST
public CallTreeCallback()
public CallTreeCallback(long threshold)
threshold - Thresholdpublic CallTreeCallback(LogTemplate<Split> callTreeLogTemplate)
callTreeLogTemplate - Log templatepublic Long getLogThreshold()
callTreeLogTemplate is a SplitThresholdLogTemplate.public void setLogThreshold(Long logThreshold)
callTreeLogTemplate with a SplitThresholdLogTemplate.public void onStopwatchStart(Split split)
CallbackStopwatchSample valid for the moment after the start is provided because the callback
is executed out of synchronized block.
It is guaranteed that Split.getStopwatch() will not return null.onStopwatchStart in interface CallbackonStopwatchStart in class CallbackSkeletonsplit - started Splitpublic void onStopwatchStop(Split split, StopwatchSample sample)
CallbackStopwatchSample valid for the moment after the stop is provided
because the callback is executed out of synchronized block.
It is guaranteed that Split.getStopwatch() will not return null.onStopwatchStop in interface CallbackonStopwatchStop in class CallbackSkeletonsplit - stopped Splitsample - stopwatch sampled after the stoppublic void onRootStopwatchStop(CallTree callTree, Split split)
callTree - call tree to logsplit - stopped splitpublic static CallTree getLastCallTree(Stopwatch stopwatch)
stopwatch - Stopwatchnull if anyCopyright © 2019. All rights reserved.