@ParametersAreNonnullByDefault @ThreadSafe public class MultiThreadedRequestMetricsCollector extends Object implements ServerMetricsDetailCollector
Constructor and Description |
---|
MultiThreadedRequestMetricsCollector(com.google.common.base.Ticker ticker) |
Modifier and Type | Method and Description |
---|---|
void |
addTimeSpentInActivity(String activityName,
java.time.Duration duration)
Adds time spent in given activity
|
void |
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 of
ServerMetricsDetailCollector.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 of
ServerMetricsDetailCollector.checkpointReached(String) - override previous information about checkpoint
with current information. |
Optional<TimingInformation> |
finishCollectionInCurrentThread() |
void |
setTimeSpentInActivity(String activityName,
java.time.Duration duration) |
void |
startCollectionInCurrentThread() |
public MultiThreadedRequestMetricsCollector(com.google.common.base.Ticker ticker)
public void startCollectionInCurrentThread()
public void checkpointReached(String checkpointName)
ServerMetricsDetailCollector
checkpointReached
in interface ServerMetricsDetailCollector
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
event jira.http.request.stats
public void checkpointReachedOnce(String checkpointName)
ServerMetricsDetailCollector
ServerMetricsDetailCollector.checkpointReached(String)
- add information about checkpoint being reached only
if checkpoint with given name was not visited before.checkpointReachedOnce
in interface ServerMetricsDetailCollector
public void checkpointReachedOverride(String checkpointName)
ServerMetricsDetailCollector
ServerMetricsDetailCollector.checkpointReached(String)
- override previous information about checkpoint
with current information.checkpointReachedOverride
in interface ServerMetricsDetailCollector
public void addTimeSpentInActivity(String activityName, java.time.Duration duration)
ServerMetricsDetailCollector
addTimeSpentInActivity
in interface ServerMetricsDetailCollector
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 timepublic void setTimeSpentInActivity(String activityName, java.time.Duration duration)
public Optional<TimingInformation> finishCollectionInCurrentThread()
Copyright © 2002-2018 Atlassian. All Rights Reserved.