|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.util.profiling.JavaSimonConfluenceMonitoring
public class JavaSimonConfluenceMonitoring
Implementation of ConfluenceMonitoring
that uses Java Simon. It is also responsible
for enabling and disabling the monitoring based on events.
Field Summary | |
---|---|
static java.lang.String |
DARK_FEATURE_SITE_KEY_FOR_ENABLE_CPU_TIMING
The Dark Feature Site key for enabling CPU timing. |
static java.lang.String |
DARK_FEATURE_SITE_KEY_FOR_ENABLE_MONITORING
The Dark Feature Site key for enabling monitoring. |
Constructor Summary | |
---|---|
JavaSimonConfluenceMonitoring(org.javasimon.Manager manager,
DarkFeaturesManager darkFeaturesMgr,
com.atlassian.event.api.EventPublisher eventPublisher,
int maxEntries)
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
java.lang.String |
createName(java.lang.String name,
java.lang.String... optional)
Creates a legal name from the supplied mandatory suggestion, and optional extra parts. |
Counter |
fetchCounter(java.lang.String name,
java.lang.String... optional)
Fetches the counter associated with the supplied name details. |
void |
onPluginFrameworkStartedEvent(PluginFrameworkStartedEvent event)
|
void |
onSiteDarkFeatureDisabledEvent(SiteDarkFeatureDisabledEvent event)
|
void |
onSiteDarkFeatureEnabledEvent(SiteDarkFeatureEnabledEvent event)
|
Split |
startSplit(java.lang.String name,
java.lang.String... optional)
Creates and starts a split timer associated with the supplied name details. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DARK_FEATURE_SITE_KEY_FOR_ENABLE_MONITORING
public static final java.lang.String DARK_FEATURE_SITE_KEY_FOR_ENABLE_CPU_TIMING
Constructor Detail |
---|
public JavaSimonConfluenceMonitoring(org.javasimon.Manager manager, DarkFeaturesManager darkFeaturesMgr, com.atlassian.event.api.EventPublisher eventPublisher, int maxEntries)
Method Detail |
---|
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public Counter fetchCounter(java.lang.String name, java.lang.String... optional)
ConfluenceMonitoring
ConfluenceMonitoring.createName(String, String...)
.
fetchCounter
in interface ConfluenceMonitoring
name
- the mandatory suggested nameoptional
- the optional parts to concatenate with the mandatory
suggestion
public Split startSplit(java.lang.String name, java.lang.String... optional)
ConfluenceMonitoring
ConfluenceMonitoring.createName(String, String...)
.
The typical usage is:
final Split split = instance.startSplit("name"); try { // code to execute } finally { split.close(); }
Under Java 7, the following is also possible:
try (Split split = instance.startSplit("name")) { // code to execute }
startSplit
in interface ConfluenceMonitoring
name
- the mandatory suggested nameoptional
- the optional parts to concatenate with the mandatory
suggestion
public java.lang.String createName(java.lang.String name, java.lang.String... optional)
ConfluenceMonitoring
The method is provided for the case where the caller wants to pre-compute the name. For example, it maybe more efficient to generate the name once, to be re-used many times. Typically, this method will not be used.
The algorithm used is very simple:
null
or a blank string,
they are replaced with an empty string.
"."
separator.
<UNKNOWN>
is returned instead.
createName
in interface ConfluenceMonitoring
name
- the mandatory suggested nameoptional
- the optional parts to concatenate with the mandatory
suggestion
@EventListener public void onPluginFrameworkStartedEvent(PluginFrameworkStartedEvent event)
@EventListener public void onSiteDarkFeatureEnabledEvent(SiteDarkFeatureEnabledEvent event)
@EventListener public void onSiteDarkFeatureDisabledEvent(SiteDarkFeatureDisabledEvent event)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |