public class ApplicationMetrics
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Represents the application metrics for a specified environment.
Modifier and Type | Field and Description |
---|---|
private java.lang.Integer |
duration
The amount of time that the metrics cover (usually 10 seconds).
|
private Latency |
latency
Represents the average latency for the slowest X percent of requests over
the last 10 seconds.
|
private java.lang.Integer |
requestCount
Average number of requests handled by the web server per second over the
last 10 seconds.
|
private StatusCodes |
statusCodes
Represents the percentage of requests over the last 10 seconds that
resulted in each type of status code response.
|
Constructor and Description |
---|
ApplicationMetrics() |
Modifier and Type | Method and Description |
---|---|
ApplicationMetrics |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.Integer |
getDuration()
The amount of time that the metrics cover (usually 10 seconds).
|
Latency |
getLatency()
Represents the average latency for the slowest X percent of requests over
the last 10 seconds.
|
java.lang.Integer |
getRequestCount()
Average number of requests handled by the web server per second over the
last 10 seconds.
|
StatusCodes |
getStatusCodes()
Represents the percentage of requests over the last 10 seconds that
resulted in each type of status code response.
|
int |
hashCode() |
void |
setDuration(java.lang.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(java.lang.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.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ApplicationMetrics |
withDuration(java.lang.Integer duration)
The amount of time that the metrics cover (usually 10 seconds).
|
ApplicationMetrics |
withLatency(Latency latency)
Represents the average latency for the slowest X percent of requests over
the last 10 seconds.
|
ApplicationMetrics |
withRequestCount(java.lang.Integer requestCount)
Average number of requests handled by the web server per second over the
last 10 seconds.
|
ApplicationMetrics |
withStatusCodes(StatusCodes statusCodes)
Represents the percentage of requests over the last 10 seconds that
resulted in each type of status code response.
|
private java.lang.Integer 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
).
private java.lang.Integer requestCount
Average number of requests handled by the web server per second over the last 10 seconds.
private StatusCodes statusCodes
Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.
private Latency 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.
public void setDuration(java.lang.Integer 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
).
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
).public java.lang.Integer 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
).
request_count
) within the most recent time slice of
10 seconds (duration
).public ApplicationMetrics withDuration(java.lang.Integer 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
).
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
).public void setRequestCount(java.lang.Integer requestCount)
Average number of requests handled by the web server per second over the last 10 seconds.
requestCount
- Average number of requests handled by the web server per second
over the last 10 seconds.public java.lang.Integer getRequestCount()
Average number of requests handled by the web server per second over the last 10 seconds.
public ApplicationMetrics withRequestCount(java.lang.Integer requestCount)
Average number of requests handled by the web server per second over the last 10 seconds.
requestCount
- Average number of requests handled by the web server per second
over the last 10 seconds.public void setStatusCodes(StatusCodes statusCodes)
Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.
statusCodes
- Represents the percentage of requests over the last 10 seconds
that resulted in each type of status code response.public StatusCodes getStatusCodes()
Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.
public ApplicationMetrics withStatusCodes(StatusCodes statusCodes)
Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.
statusCodes
- Represents the percentage of requests over the last 10 seconds
that resulted in each type of status code response.public void setLatency(Latency 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.
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.public Latency 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.
public ApplicationMetrics withLatency(Latency 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.
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.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public ApplicationMetrics clone()
clone
in class java.lang.Object