@cryptotaxi247 / netdata-1 / commits / a21407e6e

timers units is milliseconds

Costa Tsaousis (ktsaou) committed Apr 27, 2017 at 22:54 UTC a21407e6e9254978cc33be191e2dd8798e328c3c
1 file changed +4 -4
src/statsd.c
+4 -4
@@ -899,7 +899,7 @@ static inline void statsd_chart_from_set(STATSD_METRIC *m) {
899 rrdset_done(m->st);
900 }
901
902 -static inline void statsd_chart_from_timer_or_histogram(STATSD_METRIC *m, char *dim, char *family) {
902 +static inline void statsd_chart_from_timer_or_histogram(STATSD_METRIC *m, char *dim, char *family, char *units) {
903 if(unlikely(!m->st)) {
904 char type[RRD_ID_LENGTH_MAX + 1], id[RRD_ID_LENGTH_MAX + 1];
905 statsd_get_metric_type_and_id(m, type, id, dim, RRD_ID_LENGTH_MAX);
@@ -912,7 +912,7 @@ static inline void statsd_chart_from_timer_or_histogram(STATSD_METRIC *m, char *
912 , family // family (submenu)
913 , m->name // context
914 , m->name // title
915 - , "events/s" // units
915 + , units // units
916 , STATSD_CHART_PRIORITY
917 , statsd.update_every
918 , RRDSET_TYPE_AREA
@@ -957,11 +957,11 @@ static inline void statsd_chart_from_timer_or_histogram(STATSD_METRIC *m, char *
957
958
959 static inline void statsd_chart_from_timer(STATSD_METRIC *m) {
960 - statsd_chart_from_timer_or_histogram(m, "timer", "timers");
960 + statsd_chart_from_timer_or_histogram(m, "timer", "timers", "milliseconds");
961 }
962
963 static inline void statsd_chart_from_histogram(STATSD_METRIC *m) {
964 - statsd_chart_from_timer_or_histogram(m, "histogram", "histograms");
964 + statsd_chart_from_timer_or_histogram(m, "histogram", "histograms", "value");
965 }
966
967 static inline void statsd_private_charts_from_index(STATSD_INDEX *index, void (*chart_from_metric)(STATSD_METRIC *)) {