private CountStatisticImpl statsOnMs; // time elapsed since the stats collection
private boolean statsOn=false;
public JettyWebContainerStatsImpl() {
totalRequestCount = new CountStatisticImpl("Request Count", StatisticImpl.UNIT_COUNT,
"The number of requests that were handled since statistics gathering started");
activeRequestCount = new RangeStatisticImpl("Active Request Count", StatisticImpl.UNIT_COUNT,
"The number of requests being processed concurrently");
requestDuration = new TimeStatisticImpl("Request Duration", StatisticImpl.UNIT_TIME_MILLISECOND,
"The length of time that it's taken to handle individual requests");
requestDurationAvg = new CountStatisticImpl("Request Duration Average", StatisticImpl.UNIT_TIME_MILLISECOND,
"The average length of time that it's taken to handle individual requests");
response1xx = new CountStatisticImpl("Response 1xx", StatisticImpl.UNIT_COUNT,
"The number of 1xx responses");
response2xx = new CountStatisticImpl("Response 2xx", StatisticImpl.UNIT_COUNT,
"The number of 2xx responses");
response3xx = new CountStatisticImpl("Response 3xx", StatisticImpl.UNIT_COUNT,
"The number of 3xx responses");
response4xx = new CountStatisticImpl("Response 4xx", StatisticImpl.UNIT_COUNT,
"The number of 4xx responses");
response5xx = new CountStatisticImpl("Response 5xx", StatisticImpl.UNIT_COUNT,
"The number of 5xx responses");
statsOnMs = new CountStatisticImpl("Stats Duration", StatisticImpl.UNIT_TIME_MILLISECOND,
"The length of time that statistics have been collected.");
addStat("TotalRequestCount", totalRequestCount);
addStat("ActiveRequestCount", activeRequestCount);
addStat("RequestDuration", requestDuration);