Measure & report op bandwidth, include local blockstore ops in stats

This commit is contained in:
Vitaliy Filippov
2020-05-11 02:58:13 +03:00
parent 2b854948f9
commit f71d0c117b
7 changed files with 106 additions and 46 deletions
+10
View File
@@ -44,6 +44,16 @@ bool osd_t::try_send(osd_client_t & cl)
(tv_end.tv_sec - cl.write_op->tv_begin.tv_sec)*1000000 +
(tv_end.tv_nsec - cl.write_op->tv_begin.tv_nsec)/1000
);
if (cl.write_op->req.hdr.opcode == OSD_OP_READ ||
cl.write_op->req.hdr.opcode == OSD_OP_WRITE)
{
op_stat_bytes[0][cl.write_op->req.hdr.opcode] += cl.write_op->req.rw.len;
}
else if (cl.write_op->req.hdr.opcode == OSD_OP_SECONDARY_READ ||
cl.write_op->req.hdr.opcode == OSD_OP_SECONDARY_WRITE)
{
op_stat_bytes[0][cl.write_op->req.hdr.opcode] += cl.write_op->req.sec_rw.len;
}
}
}
cl.write_msg.msg_iov = cl.write_op->send_list.get_iovec();