Package org.nuxeo.runtime.util
Class Watch
- java.lang.Object
-
- org.nuxeo.runtime.util.Watch
-
public class Watch extends Object
Usage:Watch w = new Watch() w.start(); ... w.start("interval-name") w.stop("interval-name") .. w.stop()
- Since:
- 9.2
- Author:
- bogdan
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Watch.TimeInterval
-
Field Summary
Fields Modifier and Type Field Description Map<String,Watch.TimeInterval>
intervals
Watch.TimeInterval
total
-
Constructor Summary
Constructors Constructor Description Watch()
Watch(Map<String,Watch.TimeInterval> intervals)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
elapsed(String name, TimeUnit unit)
long
elapsed(TimeUnit unit)
Watch.TimeInterval[]
getIntervals()
Watch.TimeInterval
getTotal()
Watch
start()
Watch
start(String interval)
Watch
stop()
Watch
stop(String interval)
-
-
-
Field Detail
-
total
public final Watch.TimeInterval total
-
intervals
public final Map<String,Watch.TimeInterval> intervals
-
-
Constructor Detail
-
Watch
public Watch()
-
Watch
public Watch(Map<String,Watch.TimeInterval> intervals)
-
-
Method Detail
-
start
public Watch start()
-
stop
public Watch stop()
-
elapsed
public long elapsed(TimeUnit unit)
-
getTotal
public Watch.TimeInterval getTotal()
-
getIntervals
public Watch.TimeInterval[] getIntervals()
-
-