mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Add PerformanceResourceTiming: domainLookupStart
Remove wpt tests for domainLookupStart Set ResourceAttribute::DomainLookupTime Move DomainLookupStart timing before HTTP request initialization Change label of domainLookupStart TAO zero test to PASS Adjust the from_resource_timing method to initialize domain_lookup_start value Restore domainLookupsStart test
This commit is contained in:
parent
84786add22
commit
d84513cc50
6 changed files with 20 additions and 15 deletions
|
@ -441,6 +441,7 @@ pub struct ResourceCorsData {
|
|||
|
||||
#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)]
|
||||
pub struct ResourceFetchTiming {
|
||||
pub domain_lookup_start: u64,
|
||||
pub timing_type: ResourceTimingType,
|
||||
/// Number of redirects until final resource (currently limited to 20)
|
||||
pub redirect_count: u16,
|
||||
|
@ -462,6 +463,7 @@ pub enum RedirectStartValue {
|
|||
|
||||
pub enum ResourceAttribute {
|
||||
RedirectCount(u16),
|
||||
DomainLookupStart,
|
||||
RequestStart,
|
||||
ResponseStart,
|
||||
RedirectStart(RedirectStartValue),
|
||||
|
@ -483,6 +485,7 @@ impl ResourceFetchTiming {
|
|||
pub fn new(timing_type: ResourceTimingType) -> ResourceFetchTiming {
|
||||
ResourceFetchTiming {
|
||||
timing_type: timing_type,
|
||||
domain_lookup_start: 0,
|
||||
redirect_count: 0,
|
||||
request_start: 0,
|
||||
response_start: 0,
|
||||
|
@ -498,6 +501,7 @@ impl ResourceFetchTiming {
|
|||
// time origin (as described in Performance::now)
|
||||
pub fn set_attribute(&mut self, attribute: ResourceAttribute) {
|
||||
match attribute {
|
||||
ResourceAttribute::DomainLookupStart => self.domain_lookup_start = precise_time_ns(),
|
||||
ResourceAttribute::RedirectCount(count) => self.redirect_count = count,
|
||||
ResourceAttribute::RequestStart => self.request_start = precise_time_ns(),
|
||||
ResourceAttribute::ResponseStart => self.response_start = precise_time_ns(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue