mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-16 15:01:23 +01:00
Callback metric values might not just be integers - allow floats
This commit is contained in:
parent
7d2cf7e960
commit
b21b9dbc37
1 changed files with 2 additions and 2 deletions
|
@ -98,9 +98,9 @@ class CallbackMetric(BaseMetric):
|
|||
value = self.callback()
|
||||
|
||||
if self.is_scalar():
|
||||
return ["%s %d" % (self.name, value)]
|
||||
return ["%s %.12g" % (self.name, value)]
|
||||
|
||||
return ["%s%s %d" % (self.name, self._render_key(k), value[k])
|
||||
return ["%s%s %.12g" % (self.name, self._render_key(k), value[k])
|
||||
for k in sorted(value.keys())]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue