Skip to content

Commit 7635704

Browse files
Ferroinilyam8
authored andcommitted
Convert recursion timings to miliseconds. (netdata#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: netdata#7120 * Fix misspelling of milliseconds.
1 parent 7ff016e commit 7635704

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

collectors/python.d.plugin/unbound/unbound.chart.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
]
3333
},
3434
'recursion': {
35-
'options': [None, 'Recursion Timings', 'seconds', 'Unbound', 'unbound.recursion', 'line'],
35+
'options': [None, 'Recursion Timings', 'milliseconds', 'Unbound', 'unbound.recursion', 'line'],
3636
'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]
3939
]
4040
},
4141
'reqlist': {
@@ -83,11 +83,11 @@
8383
]
8484
},
8585
'_recursion': {
86-
'options': [None, '{longname} Recursion Timings', 'seconds', 'Recursive Timings',
86+
'options': [None, '{longname} Recursion Timings', 'milliseconds', 'Recursive Timings',
8787
'unbound.threads.recursion', 'line'],
8888
'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]
9191
]
9292
},
9393
'_reqlist': {
@@ -117,6 +117,7 @@
117117
'total.requestlist.exceeded': ('reqlist_exceeded', 1),
118118
'total.requestlist.current.all': ('reqlist_current', 1),
119119
'total.requestlist.current.user': ('reqlist_user', 1),
120+
# Unbound reports recursion timings as fractional seconds, but we want to show them as milliseconds.
120121
'total.recursion.time.avg': ('recursive_avg', PRECISION),
121122
'total.recursion.time.median': ('recursive_med', PRECISION),
122123
'msg.cache.count': ('cache_message', 1),
@@ -141,6 +142,7 @@
141142
'{shortname}.requestlist.exceeded': ('{shortname}_reqlist_exceeded', 1),
142143
'{shortname}.requestlist.current.all': ('{shortname}_reqlist_current', 1),
143144
'{shortname}.requestlist.current.user': ('{shortname}_reqlist_user', 1),
145+
# Unbound reports recursion timings as fractional seconds, but we want to show them as milliseconds.
144146
'{shortname}.recursion.time.avg': ('{shortname}_recursive_avg', PRECISION),
145147
'{shortname}.recursion.time.median': ('{shortname}_recursive_med', PRECISION)
146148
}

0 commit comments

Comments
 (0)