diff --git a/src/java/voldemort/store/stats/StoreStatsJmx.java b/src/java/voldemort/store/stats/StoreStatsJmx.java index f7d088c855..7a846feb0d 100644 --- a/src/java/voldemort/store/stats/StoreStatsJmx.java +++ b/src/java/voldemort/store/stats/StoreStatsJmx.java @@ -87,37 +87,43 @@ public float getPutThroughput() { return stats.getThroughput(Tracked.PUT); } - @Attribute(name = "numberOfCallsToDelete", description = "The number of calls to DELETE since the last reset.") + @Attribute(name = "numberOfCallsToDelete", description = "The number of calls to DELETE since the last reset.", + metricType = MetricType.COUNTER, dataType = DataType.LONG) @JmxGetter(name = "numberOfCallsToDelete", description = "The number of calls to DELETE since the last reset.") public long getNumberOfCallsToDelete() { return stats.getCount(Tracked.DELETE); } - @Attribute(name = "averageDeleteCompletionTimeInMs", description = "The avg. time in ms for DELETE calls to complete.") + @Attribute(name = "averageDeleteCompletionTimeInMs", description = "The avg. time in ms for DELETE calls to complete.", + metricType = MetricType.GAUGE, dataType = DataType.DURATION) @JmxGetter(name = "averageDeleteCompletionTimeInMs", description = "The avg. time in ms for DELETE calls to complete.") public double getAverageDeleteCompletionTimeInMs() { return stats.getAvgTimeInMs(Tracked.DELETE); } - @Attribute(name = "DeleteThroughput", description = "Throughput of DELETE requests.") + @Attribute(name = "DeleteThroughput", description = "Throughput of DELETE requests.", + metricType = MetricType.GAUGE, dataType = DataType.DOUBLE) @JmxGetter(name = "DeleteThroughput", description = "Throughput of DELETE requests.") public float getDeleteThroughput() { return stats.getThroughput(Tracked.DELETE); } - @Attribute(name = "numberOfObsoleteVersions", description = "Number of ObsoleteVersionExceptions since the last reset.") + @Attribute(name = "numberOfObsoleteVersions", description = "Number of ObsoleteVersionExceptions since the last reset.", + metricType = MetricType.COUNTER, dataType = DataType.LONG) @JmxGetter(name = "numberOfObsoleteVersions", description = "Number of ObsoleteVersionExceptions since the last reset.") public long getNumberOfObsoleteVersions() { return stats.getCount(Tracked.OBSOLETE); } - @Attribute(name = "numberOfExceptions", description = "The number of exceptions since the last reset.") + @Attribute(name = "numberOfExceptions", description = "The number of exceptions since the last reset.", + metricType = MetricType.COUNTER, dataType = DataType.LONG) @JmxGetter(name = "numberOfExceptions", description = "The number of exceptions since the last reset.") public long getNumberOfExceptions() { return stats.getCount(Tracked.EXCEPTION); } - @Attribute(name = "averageOperationTimeInMs", description = "The total nuber of all operations that have occured.") + @Attribute(name = "averageOperationTimeInMs", description = "The total nuber of all operations that have occured.", + metricType = MetricType.GAUGE, dataType = DataType.DURATION) @JmxGetter(name = "averageOperationTimeInMs", description = "The total nuber of all operations that have occured.") public double getAvgOperationCompletionTimeInMs() { double sum = 0.0; @@ -135,7 +141,8 @@ public double getAvgOperationCompletionTimeInMs() { return weightedTime / sum; } - @Attribute(name = "AllOperationThroughput", description = "The number of exceptions since the last reset.") + @Attribute(name = "AllOperationThroughput", description = "The number of exceptions since the last reset.", + metricType = MetricType.GAUGE, dataType = DataType.DOUBLE) @JmxGetter(name = "AllOperationThroughput", description = "The number of exceptions since the last reset.") public double getOperationThroughput() { return stats.getThroughput(Tracked.DELETE) + stats.getThroughput(Tracked.GET) @@ -143,13 +150,15 @@ public double getOperationThroughput() { } - @Attribute(name = "percentGetReturningEmptyResponse", description = "The percentage of calls to GET for which no value was found.") + @Attribute(name = "percentGetReturningEmptyResponse", description = "The percentage of calls to GET for which no value was found.", + metricType = MetricType.GAUGE, dataType = DataType.PERCENT) @JmxGetter(name = "percentGetReturningEmptyResponse", description = "The percentage of calls to GET for which no value was found.") public double getPercentGetReturningEmptyResponse() { return numEmptyResponses(stats.getNumEmptyResponses(Tracked.GET), stats.getCount(Tracked.GET)); } - @Attribute(name = "percentGetAllReturningEmptyResponse", description = "The percentage of calls to GET_ALL for which no value was found, taking into account multiple returned key-values.") + @Attribute(name = "percentGetAllReturningEmptyResponse", description = "The percentage of calls to GET_ALL for which no value was found, taking into account multiple returned key-values.", + metricType = MetricType.GAUGE, dataType = DataType.PERCENT) @JmxGetter(name = "percentGetAllReturningEmptyResponse", description = "The percentage of calls to GET_ALL for which no value was found, taking into account multiple returned key-values.") public double getPercentGetAllReturningEmptyResponse() { return numEmptyResponses(stats.getNumEmptyResponses(Tracked.GET_ALL), stats.getGetAllAggregatedCount()); @@ -159,61 +168,71 @@ private double numEmptyResponses(long numEmpty, long total) { return total == 0 ? 0.0d : numEmpty / (float)total; } - @Attribute(name = "maxPutLatencyInMs", description = "Maximum latency in ms of PUT") + @Attribute(name = "maxPutLatencyInMs", description = "Maximum latency in ms of PUT", + metricType = MetricType.GAUGE, dataType = DataType.DURATION) @JmxGetter(name = "maxPutLatencyInMs", description = "Maximum latency in ms of PUT") public long getMaxPutLatency() { return stats.getMaxLatencyInMs(Tracked.PUT); } - @Attribute(name = "maxGetLatencyInMs", description = "Maximum latency in ms of GET") + @Attribute(name = "maxGetLatencyInMs", description = "Maximum latency in ms of GET", + metricType = MetricType.GAUGE, dataType = DataType.DURATION) @JmxGetter(name = "maxGetLatencyInMs", description = "Maximum latency in ms of GET") public long getMaxGetLatency() { return stats.getMaxLatencyInMs(Tracked.GET); } - @Attribute(name = "maxGetAllLatencyInMs", description = "Maximum latency in ms of GET_ALL") + @Attribute(name = "maxGetAllLatencyInMs", description = "Maximum latency in ms of GET_ALL", + metricType = MetricType.GAUGE, dataType = DataType.DURATION) @JmxGetter(name = "maxGetAllLatencyInMs", description = "Maximum latency in ms of GET_ALL") public long getMaxGetAllLatency() { return stats.getMaxLatencyInMs(Tracked.GET_ALL); } - @Attribute(name = "maxDeleteLatencyInMs", description = "Maximum latency in ms of DELETE") + @Attribute(name = "maxDeleteLatencyInMs", description = "Maximum latency in ms of DELETE", + metricType = MetricType.GAUGE, dataType = DataType.DURATION) @JmxGetter(name = "maxDeleteLatencyInMs", description = "Maximum latency in ms of DELETE") public long getMaxDeleteLatency() { return stats.getMaxLatencyInMs(Tracked.DELETE); } - @Attribute(name = "maxPutSizeInBytes", description = "Maximum size of value returned in bytes by PUT.") + @Attribute(name = "maxPutSizeInBytes", description = "Maximum size of value returned in bytes by PUT.", + metricType = MetricType.GAUGE, dataType = DataType.STORAGE) @JmxGetter(name = "maxPutSizeInBytes", description = "Maximum size of value returned in bytes by PUT.") public long getMaxPutSizeInBytes() { return stats.getMaxSizeInBytes(Tracked.PUT); } - @Attribute(name = "maxGetAllSizeInBytes", description = "Maximum size of value returned in bytes by GET_ALL.") + @Attribute(name = "maxGetAllSizeInBytes", description = "Maximum size of value returned in bytes by GET_ALL.", + metricType = MetricType.GAUGE, dataType = DataType.STORAGE) @JmxGetter(name = "maxGetAllSizeInBytes", description = "Maximum size of value returned in bytes by GET_ALL.") public long getMaxGetAllSizeInBytes() { return stats.getMaxSizeInBytes(Tracked.GET_ALL); } - @Attribute(name = "maxGetSizeInBytes", description = "Maximum size of value returned in bytes by GET.") + @Attribute(name = "maxGetSizeInBytes", description = "Maximum size of value returned in bytes by GET.", + metricType = MetricType.GAUGE, dataType = DataType.STORAGE) @JmxGetter(name = "maxGetSizeInBytes", description = "Maximum size of value returned in bytes by GET.") public long getMaxGetSizeInBytes() { return stats.getMaxSizeInBytes(Tracked.GET); } - @Attribute(name = "averageGetValueSizeInBytes", description = "Average size in bytes of GET request") + @Attribute(name = "averageGetValueSizeInBytes", description = "Average size in bytes of GET request", + metricType = MetricType.GAUGE, dataType = DataType.STORAGE) @JmxGetter(name = "averageGetValueSizeInBytes", description = "Average size in bytes of GET request") public double getAverageGetSizeInBytes() { return stats.getAvgSizeinBytes(Tracked.GET); } - @Attribute(name = "averageGetAllSizeInBytes", description = "Average size in bytes of GET_ALL request") + @Attribute(name = "averageGetAllSizeInBytes", description = "Average size in bytes of GET_ALL request", + metricType = MetricType.GAUGE, dataType = DataType.STORAGE) @JmxGetter(name = "averageGetAllSizeInBytes", description = "Average size in bytes of GET_ALL request") public double getAverageGetAllSizeInBytes() { return stats.getAvgSizeinBytes(Tracked.GET_ALL); } - @Attribute(name = "averagePutSizeInBytes", description = "Average size in bytes of PUT request") + @Attribute(name = "averagePutSizeInBytes", description = "Average size in bytes of PUT request", + metricType = MetricType.GAUGE, dataType = DataType.STORAGE) @JmxGetter(name = "averagePutSizeInBytes", description = "Average size in bytes of PUT request") public double getAveragePutSizeInBytes() { return stats.getAvgSizeinBytes(Tracked.PUT);