Class TracingInfo
java.lang.Object
org.glassfish.jersey.message.internal.TracingInfo
Collects tracing messages for a request.
- Since:
- 2.3
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMessage
(TracingInfo.Message message) Add other tracing message.static String
formatDuration
(long duration) Format time duration in millis with accurate to 2 decimal places.static String
formatDuration
(long fromTimestamp, long toTimestamp) Format time duration in millis with accurate to 2 decimal places.static String
formatPercent
(long value, long top) Formatvalue
fromtop
value in percent with accurate to 2 decimal places.String[]
Returns all collected messages enhanced by time duration data.
-
Field Details
-
messageList
-
-
Constructor Details
-
TracingInfo
TracingInfo()
-
-
Method Details
-
formatDuration
Format time duration in millis with accurate to 2 decimal places.- Parameters:
duration
- time duration in nanos- Returns:
- Formatted duration in millis.
-
formatDuration
Format time duration in millis with accurate to 2 decimal places.- Parameters:
fromTimestamp
- start of time interval in nanostoTimestamp
- end of time interval in nanos- Returns:
- Formatted duration in millis.
-
formatPercent
Formatvalue
fromtop
value in percent with accurate to 2 decimal places.- Parameters:
value
- part value according to toptop
- 100% value- Returns:
- Formatted value in percent.
-
getMessages
Returns all collected messages enhanced by time duration data.- Returns:
- all formatted messages
-
addMessage
Add other tracing message.- Parameters:
message
- tracing message.
-