File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ def get_multixact_members_per_mxid(data_dir, db_connection):
174174
175175def get_multixact_members_usage_ratio (data_dir , _db_connection ):
176176 members = _get_multixact_members (data_dir )
177- ratio = members // MAX_MULTIXACT_MEMBERS
177+ ratio = round ( members / MAX_MULTIXACT_MEMBERS , 2 )
178178 percentage_remaining = (1.0 - ratio ) * 100
179179 return [metric_multixact_members_remaining_ratio (percentage_remaining )]
180180
@@ -183,7 +183,7 @@ def get_multixact_remaining_ratio(_data_dir, db_connection):
183183 mxid_age = get_max_mxid_age (db_connection )
184184 if not mxid_age :
185185 return []
186- ratio = mxid_age // WRAPAROUND_LIMIT
186+ ratio = round ( mxid_age / WRAPAROUND_LIMIT , 2 )
187187 percentage_remaining = (1.0 - ratio ) * 100
188188 return [metric_multixact_remaining_ratio (percentage_remaining )]
189189
@@ -192,7 +192,7 @@ def get_xid_remaining_ratio(_data_dir, db_connection):
192192 xid_age = get_max_xid_age (db_connection )
193193 if not xid_age :
194194 return []
195- ratio = xid_age // WRAPAROUND_LIMIT
195+ ratio = round ( xid_age / WRAPAROUND_LIMIT , 2 )
196196 percentage_remaining = (1.0 - ratio ) * 100
197197 return [metric_xid_remaining_ratio (percentage_remaining )]
198198
You can’t perform that action at this time.
0 commit comments