block_util: add timestamp in request

Add timestamp per request, so that we could account
block process latency base request.

Signed-off-by: Yong He <alexyonghe@tencent.com>
This commit is contained in:
Yong He 2022-12-27 15:43:07 +08:00 committed by Rob Bradford
parent 4e3bc20f2c
commit e2ea9e2821

View File

@ -34,6 +34,7 @@ use std::path::Path;
use std::result;
use std::sync::Arc;
use std::sync::MutexGuard;
use std::time::Instant;
use thiserror::Error;
use versionize::{VersionMap, Versionize, VersionizeResult};
use versionize_derive::Versionize;
@ -201,6 +202,7 @@ pub struct Request {
pub status_addr: GuestAddress,
pub writeback: bool,
pub aligned_operations: Vec<AlignedOperation>,
pub start: Instant,
}
impl Request {
@ -232,6 +234,7 @@ impl Request {
status_addr: GuestAddress(0),
writeback: true,
aligned_operations: Vec::new(),
start: Instant::now(),
};
let status_desc;