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 TypeMethodDescriptionvoidaddMessage(TracingInfo.Message message) Add other tracing message.static StringformatDuration(long duration) Format time duration in millis with accurate to 2 decimal places.static StringformatDuration(long fromTimestamp, long toTimestamp) Format time duration in millis with accurate to 2 decimal places.static StringformatPercent(long value, long top) Formatvaluefromtopvalue 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
Formatvaluefromtopvalue 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.
-