@cryptotaxi247 / netdata-1 / commits / 7635704ac

Convert recursion timings to miliseconds. (#7121)

* Convert recusion timings to miliseconds. Ths avoids them being mangled to the point of being useless when the locale settings are configured to convert seconds to times. These were originally implemented as seconds because that's how Unound itself reports them. Fixes: #7120 * Fix misspelling of milliseconds.

Austin S. Hemmelgarn committed Oct 17, 2019 at 11:31 UTC 7635704ac48dce9bbe55c190988cfeacb277cbfc
1 file changed +8 -6
collectors/python.d.plugin/unbound/unbound.chart.py
+8 -6
@@ -32,10 +32,10 @@ CHARTS = {
32 ]
33 },
34 'recursion': {
35 - 'options': [None, 'Recursion Timings', 'seconds', 'Unbound', 'unbound.recursion', 'line'],
35 + 'options': [None, 'Recursion Timings', 'milliseconds', 'Unbound', 'unbound.recursion', 'line'],
36 'lines': [
37 - ['recursive_avg', 'average', 'absolute', 1, PRECISION],
38 - ['recursive_med', 'median', 'absolute', 1, PRECISION]
37 + ['recursive_avg', 'average', 'absolute', 1, 1],
38 + ['recursive_med', 'median', 'absolute', 1, 1]
39 ]
40 },
41 'reqlist': {
@@ -83,11 +83,11 @@ PER_THREAD_CHARTS = {
83 ]
84 },
85 '_recursion': {
86 - 'options': [None, '{longname} Recursion Timings', 'seconds', 'Recursive Timings',
86 + 'options': [None, '{longname} Recursion Timings', 'milliseconds', 'Recursive Timings',
87 'unbound.threads.recursion', 'line'],
88 'lines': [
89 - ['{shortname}_recursive_avg', 'average', 'absolute', 1, PRECISION],
90 - ['{shortname}_recursive_med', 'median', 'absolute', 1, PRECISION]
89 + ['{shortname}_recursive_avg', 'average', 'absolute', 1, 1],
90 + ['{shortname}_recursive_med', 'median', 'absolute', 1, 1]
91 ]
92 },
93 '_reqlist': {
@@ -117,6 +117,7 @@ STAT_MAP = {
117 'total.requestlist.exceeded': ('reqlist_exceeded', 1),
118 'total.requestlist.current.all': ('reqlist_current', 1),
119 'total.requestlist.current.user': ('reqlist_user', 1),
120 + # Unbound reports recursion timings as fractional seconds, but we want to show them as milliseconds.
121 'total.recursion.time.avg': ('recursive_avg', PRECISION),
122 'total.recursion.time.median': ('recursive_med', PRECISION),
123 'msg.cache.count': ('cache_message', 1),
@@ -141,6 +142,7 @@ PER_THREAD_STAT_MAP = {
142 '{shortname}.requestlist.exceeded': ('{shortname}_reqlist_exceeded', 1),
143 '{shortname}.requestlist.current.all': ('{shortname}_reqlist_current', 1),
144 '{shortname}.requestlist.current.user': ('{shortname}_reqlist_user', 1),
145 + # Unbound reports recursion timings as fractional seconds, but we want to show them as milliseconds.
146 '{shortname}.recursion.time.avg': ('{shortname}_recursive_avg', PRECISION),
147 '{shortname}.recursion.time.median': ('{shortname}_recursive_med', PRECISION)
148 }