mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
@@ -34,6 +34,7 @@ use std::path::Path;
|
|||||||
use std::result;
|
use std::result;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::sync::MutexGuard;
|
use std::sync::MutexGuard;
|
||||||
|
use std::time::Instant;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
use versionize::{VersionMap, Versionize, VersionizeResult};
|
use versionize::{VersionMap, Versionize, VersionizeResult};
|
||||||
use versionize_derive::Versionize;
|
use versionize_derive::Versionize;
|
||||||
@@ -201,6 +202,7 @@ pub struct Request {
|
|||||||
pub status_addr: GuestAddress,
|
pub status_addr: GuestAddress,
|
||||||
pub writeback: bool,
|
pub writeback: bool,
|
||||||
pub aligned_operations: Vec<AlignedOperation>,
|
pub aligned_operations: Vec<AlignedOperation>,
|
||||||
|
pub start: Instant,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Request {
|
impl Request {
|
||||||
@@ -232,6 +234,7 @@ impl Request {
|
|||||||
status_addr: GuestAddress(0),
|
status_addr: GuestAddress(0),
|
||||||
writeback: true,
|
writeback: true,
|
||||||
aligned_operations: Vec::new(),
|
aligned_operations: Vec::new(),
|
||||||
|
start: Instant::now(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let status_desc;
|
let status_desc;
|
||||||
|
|||||||
Reference in New Issue
Block a user