Class ApplicationMetrics
- All Implemented Interfaces:
Serializable
,Cloneable
Represents the application metrics for a specified environment.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
The amount of time that the metrics cover (usually 10 seconds).Represents the average latency for the slowest X percent of requests over the last 10 seconds.Average number of requests handled by the web server per second over the last 10 seconds.Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.int
hashCode()
void
setDuration
(Integer duration) The amount of time that the metrics cover (usually 10 seconds).void
setLatency
(Latency latency) Represents the average latency for the slowest X percent of requests over the last 10 seconds.void
setRequestCount
(Integer requestCount) Average number of requests handled by the web server per second over the last 10 seconds.void
setStatusCodes
(StatusCodes statusCodes) Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.toString()
Returns a string representation of this object; useful for testing and debugging.withDuration
(Integer duration) The amount of time that the metrics cover (usually 10 seconds).withLatency
(Latency latency) Represents the average latency for the slowest X percent of requests over the last 10 seconds.withRequestCount
(Integer requestCount) Average number of requests handled by the web server per second over the last 10 seconds.withStatusCodes
(StatusCodes statusCodes) Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.
-
Constructor Details
-
ApplicationMetrics
public ApplicationMetrics()
-
-
Method Details
-
setDuration
The amount of time that the metrics cover (usually 10 seconds). For example, you might have 5 requests (
request_count
) within the most recent time slice of 10 seconds (duration
).- Parameters:
duration
- The amount of time that the metrics cover (usually 10 seconds). For example, you might have 5 requests (request_count
) within the most recent time slice of 10 seconds (duration
).
-
getDuration
The amount of time that the metrics cover (usually 10 seconds). For example, you might have 5 requests (
request_count
) within the most recent time slice of 10 seconds (duration
).- Returns:
- The amount of time that the metrics cover (usually 10 seconds).
For example, you might have 5 requests (
request_count
) within the most recent time slice of 10 seconds (duration
).
-
withDuration
The amount of time that the metrics cover (usually 10 seconds). For example, you might have 5 requests (
request_count
) within the most recent time slice of 10 seconds (duration
).- Parameters:
duration
- The amount of time that the metrics cover (usually 10 seconds). For example, you might have 5 requests (request_count
) within the most recent time slice of 10 seconds (duration
).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRequestCount
Average number of requests handled by the web server per second over the last 10 seconds.
- Parameters:
requestCount
- Average number of requests handled by the web server per second over the last 10 seconds.
-
getRequestCount
Average number of requests handled by the web server per second over the last 10 seconds.
- Returns:
- Average number of requests handled by the web server per second over the last 10 seconds.
-
withRequestCount
Average number of requests handled by the web server per second over the last 10 seconds.
- Parameters:
requestCount
- Average number of requests handled by the web server per second over the last 10 seconds.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStatusCodes
Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.
- Parameters:
statusCodes
- Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.
-
getStatusCodes
Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.
- Returns:
- Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.
-
withStatusCodes
Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.
- Parameters:
statusCodes
- Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLatency
Represents the average latency for the slowest X percent of requests over the last 10 seconds. Latencies are in seconds with one milisecond resolution.
- Parameters:
latency
- Represents the average latency for the slowest X percent of requests over the last 10 seconds. Latencies are in seconds with one milisecond resolution.
-
getLatency
Represents the average latency for the slowest X percent of requests over the last 10 seconds. Latencies are in seconds with one milisecond resolution.
- Returns:
- Represents the average latency for the slowest X percent of requests over the last 10 seconds. Latencies are in seconds with one milisecond resolution.
-
withLatency
Represents the average latency for the slowest X percent of requests over the last 10 seconds. Latencies are in seconds with one milisecond resolution.
- Parameters:
latency
- Represents the average latency for the slowest X percent of requests over the last 10 seconds. Latencies are in seconds with one milisecond resolution.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-