mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
ISSUE-21263: implemented attribute setting in http loader
This commit is contained in:
parent
328244684a
commit
fdbec9835c
6 changed files with 49 additions and 22 deletions
|
@ -449,7 +449,7 @@ pub struct ResourceFetchTiming {
|
|||
pub request_start: u64,
|
||||
pub response_start: u64,
|
||||
pub fetch_start: u64,
|
||||
// pub response_end: u64,
|
||||
pub response_end: u64,
|
||||
pub redirect_start: u64,
|
||||
// pub redirect_end: u64,
|
||||
// pub connect_start: u64,
|
||||
|
@ -469,6 +469,7 @@ pub enum ResourceAttribute {
|
|||
RedirectStart(RedirectStartValue),
|
||||
FetchStart,
|
||||
ConnectEnd(u64),
|
||||
ResponseEnd,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, PartialEq, Serialize)]
|
||||
|
@ -489,6 +490,7 @@ impl ResourceFetchTiming {
|
|||
fetch_start: 0,
|
||||
redirect_start: 0,
|
||||
connect_end: 0,
|
||||
response_end: 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -509,6 +511,7 @@ impl ResourceFetchTiming {
|
|||
},
|
||||
ResourceAttribute::FetchStart => self.fetch_start = precise_time_ns(),
|
||||
ResourceAttribute::ConnectEnd(val) => self.connect_end = val,
|
||||
ResourceAttribute::ResponseEnd => self.response_end = precise_time_ns(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue