ISSUE-21263: implemented attribute setting in http loader

This commit is contained in:
Thomas Delacour 2019-04-01 23:32:03 -04:00 committed by Josh Matthews
parent 328244684a
commit fdbec9835c
6 changed files with 49 additions and 22 deletions

View file

@ -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(),
}
}
}