Package | Description |
---|---|
org.javasimon |
Core package, contains
Simon implementations, with
the SimonManager as the center point of the API. |
org.javasimon.callback | |
org.javasimon.callback.calltree |
CallTreeCallback gathers information
for current thread and displays it subsequent calls like a tree. |
org.javasimon.callback.lastsplits |
LastSplitsCallback retains last
splits in a ring a buffer (fixed size FIFO queue). |
org.javasimon.callback.logging |
LoggingCallback is able to log stopwatch splits and statistics once
in a while (N per millisecond, every N split, when split is longer than N ms, etc.)
and to various outputs (SLF4J, JUL). |
org.javasimon.callback.quantiles |
QuantilesCallback sorts splits to categories
(Bucket s) based on time ranges. |
org.javasimon.callback.timeline | |
org.javasimon.javaee |
Java EE support for Simons contains Java EE components (servlet filter and EJB/CDI interceptor) that can be used or extended.
|
org.javasimon.javaee.reqreporter |
Package contains classes reporting slow HTTP requests - interface
RequestReporter and various (default) implementations. |
org.javasimon.jdbc4 |
Simon JDBC 4.1 (Java SE 7) Proxy Driver for monitoring JDBC drivers through the Java Simon API.
|
org.javasimon.source |
MonitorSource is the interface used as function to transform execution context (method invocation,
HTTP request...) into a Simon. |
org.javasimon.spring |
Support classes to automatically monitor Spring beans with the
Monitored annotation. |
org.javasimon.spring.webmvc |
MonitoringHandlerInterceptor is a Spring MVC interceptor which can be used to monitor
time spent in Controller and View. |
org.javasimon.utils |
Java Simon supporting utilities and tools.
|
Modifier and Type | Field and Description |
---|---|
static Split |
Split.DISABLED
Disabled split (implies not running) for cases where monitoring is disabled and
null value is not an option. |
Modifier and Type | Method and Description |
---|---|
static Split |
Split.create(long nanos)
Creates simulated non-running Split that took specific time in nanos.
|
static Split |
Split.create(long nanos,
SimonClock clock)
Creates simulated non-running Split that took specific time in nanos.
|
Split |
Stopwatch.start()
Starts the new split for this stopwatch.
|
static Split |
Split.start()
Creates a new Split for direct use without
Stopwatch ("anonymous split") based on system time. |
static Split |
Split.start(SimonClock clock)
Creates a new Split for direct use without
Stopwatch ("anonymous split") based on specified SimonClock . |
Split |
Split.stop()
Stops the split, updates the stopwatch and returns this.
|
Split |
Split.stop(String subSimon)
Stops the split, updates the sub-stopwatch specified by parameter and returns this.
|
Modifier and Type | Method and Description |
---|---|
Stopwatch |
Stopwatch.addSplit(Split split)
Adds
Split to the stopwatch which is useful for aggregation of splits created for other stopwatch. |
Modifier and Type | Method and Description |
---|---|
void |
CompositeFilterCallback.onStopwatchAdd(Stopwatch stopwatch,
Split split,
StopwatchSample sample) |
void |
CompositeCallbackImpl.onStopwatchAdd(Stopwatch stopwatch,
Split split,
StopwatchSample sample) |
void |
CallbackSkeleton.onStopwatchAdd(Stopwatch stopwatch,
Split split,
StopwatchSample sample) |
void |
Callback.onStopwatchAdd(Stopwatch stopwatch,
Split split,
StopwatchSample sample)
Stopwatch add split event.
|
void |
CompositeFilterCallback.onStopwatchStart(Split split) |
void |
CompositeCallbackImpl.onStopwatchStart(Split split) |
void |
CallbackSkeleton.onStopwatchStart(Split split) |
void |
Callback.onStopwatchStart(Split split)
Stopwatch start event.
|
void |
CompositeFilterCallback.onStopwatchStop(Split split,
StopwatchSample sample) |
void |
CompositeCallbackImpl.onStopwatchStop(Split split,
StopwatchSample sample) |
void |
CallbackSkeleton.onStopwatchStop(Split split,
StopwatchSample sample) |
void |
Callback.onStopwatchStop(Split split,
StopwatchSample sample)
Stopwatch stop event.
|
Modifier and Type | Method and Description |
---|---|
void |
CallTreeNode.addSplit(Split split)
Adds a split to the current tree node.
|
String |
CallTree.getLogMessage(Split context)
Transforms this call tree into a loggable message.
|
void |
CallTree.onRootStopwatchStart(CallTreeNode rootNode,
Split split)
When stopwatch is started, and the root tree node is pushed into
the call stack, this method is called.
|
protected void |
CallTree.onRootStopwatchStop(CallTreeNode callTreeNode,
Split split)
When stopwatch is stopped, and root tree node is popped from
call stack, this method is called.
|
void |
CallTreeCallback.onRootStopwatchStop(CallTree callTree,
Split split)
When stopwatch corresponding to root tree node is stopped, this method is called.
|
void |
CallTreeCallback.onStopwatchStart(Split split) |
CallTreeNode |
CallTree.onStopwatchStart(Split split)
When stopwatch is started, a new tree node is added to the parent
tree node and pushed on the call stack.
|
CallTreeNode |
CallTree.onStopwatchStop(Split split)
When stopwatch is stopped, the the split is added to current tree node
and this tree node is popped from call stack.
|
void |
CallTreeCallback.onStopwatchStop(Split split,
StopwatchSample sample) |
Constructor and Description |
---|
CallTreeCallback(LogTemplate<Split> callTreeLogTemplate)
Constructor with log template.
|
Modifier and Type | Method and Description |
---|---|
protected LogTemplate<Split> |
LastSplitsCallback.createLogTemplate(Stopwatch stopwatch)
Create log template for given stopwatch.
|
LogTemplate<Split> |
LastSplits.getLogTemplate() |
Modifier and Type | Method and Description |
---|---|
void |
LastSplits.add(Split split)
Adds split to the buffer.
|
String |
LastSplits.getLogMessage(Split lastSplit)
Transforms this list of splits into a loggable message.
|
void |
LastSplits.log(Split lastSplit)
Log eventually this list of splits into log template
|
void |
LastSplitsCallback.onStopwatchAdd(Stopwatch stopwatch,
Split split,
StopwatchSample sample) |
void |
LastSplitsCallback.onStopwatchStop(Split split,
StopwatchSample sample)
When a Splits is stopped, it is added to the stopwatch a Last Splits attribute.
|
Modifier and Type | Method and Description |
---|---|
void |
LastSplits.setLogTemplate(LogTemplate<Split> logTemplate) |
Modifier and Type | Method and Description |
---|---|
LogTemplate<Split> |
LoggingCallback.getStopwatchLogTemplate()
Get log template used for stopwatch splits.
|
protected LogTemplate<Split> |
LoggingCallback.getStopwatchLogTemplate(Stopwatch stopwatch)
Get log template for stopwatch, defaults to
LoggingCallback.stopwatchLogTemplate . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
SplitThresholdLogTemplate.isEnabled(Split split) |
void |
LoggingCallback.onStopwatchStop(Split split,
StopwatchSample sample)
Stopwatch stop event.
|
Modifier and Type | Method and Description |
---|---|
static SplitThresholdLogTemplate |
LogTemplates.whenSplitLongerThanMilliseconds(LogTemplate<Split> delegateLogger,
long threshold)
Produces a log template which logs something when stopwatch split is longer than threshold.
|
static SplitThresholdLogTemplate |
LogTemplates.whenSplitLongerThanNanoseconds(LogTemplate<Split> delegateLogger,
long threshold)
Produces a log template which logs something when stopwatch split is longer than threshold.
|
Constructor and Description |
---|
LoggingCallback(LogTemplate<Split> stopwatchLogTemplate,
LogTemplate<String> managerLogTemplate)
Constructor which can be used to customize log templates.
|
SplitThresholdLogTemplate(LogTemplate<Split> delegate,
long threshold)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected LogTemplate<Split> |
QuantilesCallback.createLogTemplate(Stopwatch stopwatch)
Create log template for given stopwatch.
|
LogTemplate<Split> |
Buckets.getLogTemplate() |
Modifier and Type | Method and Description |
---|---|
String |
Buckets.getLogMessage(Split lastSplit)
Transforms buckets and quantiles into a loggable message.
|
void |
Buckets.log(Split lastSplit)
Logs eventually buckets config and quantiles.
|
void |
QuantilesCallback.onStopwatchAdd(Stopwatch stopwatch,
Split split,
StopwatchSample sample)
When a split is added, if buckets have been initialized, the value is added to appropriate bucket.
|
protected void |
QuantilesCallback.onStopwatchSplit(Stopwatch stopwatch,
Split split)
Called when there is a new split on a Stopwatch, either
QuantilesCallback.onStopwatchStop(org.javasimon.Split, org.javasimon.StopwatchSample) or QuantilesCallback.onStopwatchAdd(org.javasimon.Stopwatch, org.javasimon.Split, org.javasimon.StopwatchSample) . |
protected void |
AutoQuantilesCallback.onStopwatchSplit(Stopwatch stopwatch,
Split split)
Called when there is a new split on a Stopwatch, either
QuantilesCallback.onStopwatchStop(org.javasimon.Split, org.javasimon.StopwatchSample) or QuantilesCallback.onStopwatchAdd(org.javasimon.Stopwatch, org.javasimon.Split, org.javasimon.StopwatchSample) . |
void |
QuantilesCallback.onStopwatchStop(Split split,
StopwatchSample sample)
When a split is stopped, if buckets have been initialized, the value
is added to appropriate bucket.
|
Modifier and Type | Method and Description |
---|---|
void |
Buckets.setLogTemplate(LogTemplate<Split> logTemplate) |
Modifier and Type | Method and Description |
---|---|
void |
StopwatchTimeline.addSplit(Split split)
Main method used to insert the split on the timeline:
Split start is used to determine in which time-range it should be split.
|
void |
TimelineCallback.onStopwatchAdd(Stopwatch stopwatch,
Split split,
StopwatchSample sample) |
void |
TimelineCallback.onStopwatchStop(Split split,
StopwatchSample sample) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
SimonServletFilter.shouldBeReported(javax.servlet.http.HttpServletRequest request,
long requestNanoTime,
List<Split> splits)
Determines whether the request is over the threshold - with all incoming parameters this method can be
very flexible.
|
Modifier and Type | Method and Description |
---|---|
void |
ReporterStopwatchInfo.addSplit(Split split) |
protected boolean |
DefaultRequestReporter.isSignificantSplit(Split split,
Split requestSplit)
Can be overridden to decide whether
Split is considered significant to be reported in the first part of the output. |
void |
RequestReporter.reportRequest(javax.servlet.http.HttpServletRequest request,
Split requestSplit,
List<Split> splits)
Reports request that exceeds the threshold.
|
void |
PlainRequestReporter.reportRequest(javax.servlet.http.HttpServletRequest request,
Split requestSplit,
List<Split> splits) |
void |
DefaultRequestReporter.reportRequest(javax.servlet.http.HttpServletRequest request,
Split requestSplit,
List<Split> splits) |
protected boolean |
PlainRequestReporter.shouldBeAddedSplit(Split split)
Decides whether split should be included in the report - by default all are included.
|
Modifier and Type | Method and Description |
---|---|
void |
RequestReporter.reportRequest(javax.servlet.http.HttpServletRequest request,
Split requestSplit,
List<Split> splits)
Reports request that exceeds the threshold.
|
void |
PlainRequestReporter.reportRequest(javax.servlet.http.HttpServletRequest request,
Split requestSplit,
List<Split> splits) |
void |
DefaultRequestReporter.reportRequest(javax.servlet.http.HttpServletRequest request,
Split requestSplit,
List<Split> splits) |
Modifier and Type | Field and Description |
---|---|
protected Split |
SimonStatement.split
Stopwatch split measuring the lifespan of the statement until it is closed across all executes.
|
Modifier and Type | Method and Description |
---|---|
protected Split |
SimonStatement.prepare(List<String> sqls)
Called before each SQL command execution.
|
protected Split |
SimonStatement.prepare(String sql)
Called before each SQL command execution.
|
protected Split |
SimonStatement.startSplit()
Starts the split for the SQL specific stopwatch, sets the note and returns the split.
|
Modifier and Type | Method and Description |
---|---|
protected void |
SimonStatement.finish(Split split)
Called after each SQL command execution.
|
Modifier and Type | Method and Description |
---|---|
Split |
StopwatchSource.start(L location)
Convenient method to return split for the location or disabled split, if the location is not monitored.
|
Split |
DisabledStopwatchSource.start(L location) |
Split |
CachedStopwatchSource.start(L location) |
Split |
AbstractStopwatchSource.start(T location) |
Modifier and Type | Method and Description |
---|---|
protected Object |
MonitoringInterceptor.processInvoke(org.aopalliance.intercept.MethodInvocation invocation,
Split split)
Method stops the split
|
protected Object |
BasicMonitoringInterceptor.processInvoke(org.aopalliance.intercept.MethodInvocation invocation,
Split split)
Method with default invoke (just calls proceed).
|
Modifier and Type | Method and Description |
---|---|
Split |
HandlerLocation.getSplit() |
protected Split |
MonitoringHandlerInterceptor.startStopwatch(HandlerLocation location)
Start stopwatch for given name and thread.
|
protected Split |
MonitoringHandlerInterceptor.stopStopwatch()
Stop current thread stopwatch (if any).
|
Modifier and Type | Method and Description |
---|---|
void |
HandlerLocation.setSplit(Split split) |
Modifier and Type | Method and Description |
---|---|
void |
SystemDebugCallback.onStopwatchAdd(Stopwatch stopwatch,
Split split,
StopwatchSample sample) |
void |
SystemDebugCallback.onStopwatchStart(Split split) |
void |
SLF4JLoggingCallback.onStopwatchStart(Split split)
Logs Simon start on a specified log marker.
|
void |
LoggingCallback.onStopwatchStart(Split split)
Logs Simon start on a specified log level.
|
void |
SystemDebugCallback.onStopwatchStop(Split split,
StopwatchSample sample) |
void |
SLF4JLoggingCallback.onStopwatchStop(Split split,
StopwatchSample sample)
Logs Simon stop on a specified log marker.
|
void |
LoggingCallback.onStopwatchStop(Split split,
StopwatchSample sample)
Logs Simon stop on a specified log level.
|
Copyright © 2019. All rights reserved.