Package com.atlassian.jira.servermetrics
Class MultiThreadedRequestMetricsCollector
java.lang.Object
com.atlassian.jira.servermetrics.MultiThreadedRequestMetricsCollector
- All Implemented Interfaces:
ServerMetricsDetailCollector
@ParametersAreNonnullByDefault
@ThreadSafe
public class MultiThreadedRequestMetricsCollector
extends Object
implements ServerMetricsDetailCollector
Manages per-thread collection of request server metrics
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTimeSpentInActivity
(String activityName, Duration duration) Adds time spent in given activityvoid
checkpointReached
(String checkpointName) Insert information that some named point in request processing was reached.
For server metrics purposes request will be divided into several named blocks and time spent in each block will be logged.void
checkpointReachedOnce
(String checkpointName) This is special case ofServerMetricsDetailCollector.checkpointReached(String)
- add information about checkpoint being reached only if checkpoint with given name was not visited before.void
checkpointReachedOverride
(String checkpointName) This is special case ofServerMetricsDetailCollector.checkpointReached(String)
- override previous information about checkpoint with current information.void
setTimeSpentInActivity
(String activityName, Duration duration) void
-
Constructor Details
-
MultiThreadedRequestMetricsCollector
public MultiThreadedRequestMetricsCollector(com.google.common.base.Ticker ticker)
-
-
Method Details
-
startCollectionInCurrentThread
public void startCollectionInCurrentThread() -
checkpointReached
Description copied from interface:ServerMetricsDetailCollector
Insert information that some named point in request processing was reached.
For server metrics purposes request will be divided into several named blocks and time spent in each block will be logged.- Specified by:
checkpointReached
in interfaceServerMetricsDetailCollector
- Parameters:
checkpointName
- name of checkpoint - should be whitelisted in jira analytics whitelist:jira-components/jira-plugins/jira-analytics-whitelist-plugin/src/main/resources/jira-analytics-whitelist-plugin-whitelist.json
eventjira.http.request.stats
-
checkpointReachedOnce
Description copied from interface:ServerMetricsDetailCollector
This is special case ofServerMetricsDetailCollector.checkpointReached(String)
- add information about checkpoint being reached only if checkpoint with given name was not visited before.- Specified by:
checkpointReachedOnce
in interfaceServerMetricsDetailCollector
-
checkpointReachedOverride
Description copied from interface:ServerMetricsDetailCollector
This is special case ofServerMetricsDetailCollector.checkpointReached(String)
- override previous information about checkpoint with current information.- Specified by:
checkpointReachedOverride
in interfaceServerMetricsDetailCollector
-
addTimeSpentInActivity
Description copied from interface:ServerMetricsDetailCollector
Adds time spent in given activity- Specified by:
addTimeSpentInActivity
in interfaceServerMetricsDetailCollector
- Parameters:
activityName
- activity name i.e.: databaseRead, cacheLoad, etc... - should be whitelisted in jira analytics whitelist:jira-components/jira-plugins/jira-analytics-whitelist-plugin/src/main/resources/jira-analytics-whitelist-plugin-whitelist.json
duration
- duration that will be added to current activity time
-
setTimeSpentInActivity
-
finishCollectionInCurrentThread
-