Class TaskTimer
java.lang.Object
com.codebarrel.jira.plugin.automation.util.TaskTimer
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean
@Named
@ThreadSafe
public class TaskTimer
extends Object
implements org.springframework.beans.factory.DisposableBean
Customers need to turn on DEBUG logging for com.codebarrel.jira.plugin.automation.util.TaskTimer
This class allows you approximately time tasks across threads and will provide output of stats every
SPLITms to DEBUG & optionally, a file.
It's quite handy to track how things are performing is high volumne systems. Sample output:
Sat Oct 28 01:00:55 AEDT 2017,queue_auto_event,Split:,10s,Invocation:,181,Total time (ms):,12245,Total/inv (ms):,67.65,Utilization: 122.40%,Throughput/s: 18.09 Sat Oct 28 01:00:55 AEDT 2017,claimer,Split:,10s,Invocation:,24,Total time (ms):,5500,Total/inv (ms):,229.17,Utilization: 54.99%,Throughput/s: 2.40 Sat Oct 28 01:00:55 AEDT 2017,jira_event,Split:,10s,Invocation:,194,Total time (ms):,4581,Total/inv (ms):,23.61,Utilization: 45.80%,Throughput/s: 19.40 Sat Oct 28 01:00:55 AEDT 2017,executor,Split:,10s,Invocation:,46,Total time (ms):,11616,Total/inv (ms):,252.52,Utilization: 116.15%,Throughput/s: 4.60 Sat Oct 28 01:00:55 AEDT 2017,submitted_event,Split:,10s,Invocation:,194,Total time (ms):,7,Total/inv (ms):,0.04,Utilization: 0.07%,Throughput/s: 19.40 Sat Oct 28 01:11:15 AEDT 2017,claimer,Split:,10s,Invocation:,265,Total time (ms):,1664,Total/inv (ms):,6.28,Utilization: 16.63%,Throughput/s: 26.49 Sat Oct 28 01:11:15 AEDT 2017,executor,Split:,10s,Invocation:,529,Total time (ms):,13128,Total/inv (ms):,24.82,Utilization: 131.21%,Throughput/s: 52.87
The columns are:
(1) Timestamp (2) Key of the task you're tracking. You can give this anything, so even the issueKey or ruleId, meaning your can group event types (3) # of invocations (4) Total time (ms) (5) Utilization: % of time / the last split. Can be > 100% if multithreaded (6) Invocations / second
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TaskTimer
public TaskTimer()
-
-
Method Details
-
destroy
- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-
reset
-
timeTask
-