Do not wipe previous metrics at moments when difference is 0
This commit is contained in:
+2
-2
@@ -3,10 +3,10 @@
|
|||||||
|
|
||||||
function derive_osd_stats(st, prev, prev_diff)
|
function derive_osd_stats(st, prev, prev_diff)
|
||||||
{
|
{
|
||||||
const diff = { op_stats: {}, subop_stats: {}, recovery_stats: {}, inode_stats: {} };
|
const diff = prev_diff || { op_stats: {}, subop_stats: {}, recovery_stats: {}, inode_stats: {} };
|
||||||
if (!st || !st.time || !prev || !prev.time || prev.time >= st.time)
|
if (!st || !st.time || !prev || !prev.time || prev.time >= st.time)
|
||||||
{
|
{
|
||||||
return prev_diff || diff;
|
return diff;
|
||||||
}
|
}
|
||||||
const timediff = BigInt(st.time*1000 - prev.time*1000);
|
const timediff = BigInt(st.time*1000 - prev.time*1000);
|
||||||
for (const op in st.op_stats||{})
|
for (const op in st.op_stats||{})
|
||||||
|
|||||||
Reference in New Issue
Block a user