aboutsummaryrefslogtreecommitdiffstats
path: root/components/net_traits/lib.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-05-17 18:10:09 -0400
committerGitHub <noreply@github.com>2019-05-17 18:10:09 -0400
commit208d6cb99e903942a77160f51c5483fd2edd40a1 (patch)
tree6f862031df7c12927d8da807aa673f70829c3851 /components/net_traits/lib.rs
parentcdd95caa8dc46c3e5868c83dee090e12e9d2ed62 (diff)
parent4ca4ab8bf7fce9bce3d137dddda288ee51f1d282 (diff)
downloadservo-208d6cb99e903942a77160f51c5483fd2edd40a1.tar.gz
servo-208d6cb99e903942a77160f51c5483fd2edd40a1.zip
Auto merge of #23323 - nehalem501:master, r=jdm
Implement connectStart in PerformanceResourceTiming <!-- Please describe your changes on the following line: --> - Added connectStart where needed (```ResourceFetchTiming```, ```ResourceAttribute```) in ```components/net_traits/lib.rs ``` - Before calling ```client.request``` in ```obtain_response```, we now add the ```connectStart``` attribute (```components/net/http_loader.rs```) - Updated tests to reflect those changes --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [X] These changes fix #21261 (at least partially) <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23323) <!-- Reviewable:end -->
Diffstat (limited to 'components/net_traits/lib.rs')
-rw-r--r--components/net_traits/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/net_traits/lib.rs b/components/net_traits/lib.rs
index 59d997df71d..853692da33c 100644
--- a/components/net_traits/lib.rs
+++ b/components/net_traits/lib.rs
@@ -452,7 +452,7 @@ pub struct ResourceFetchTiming {
pub response_end: u64,
pub redirect_start: u64,
// pub redirect_end: u64,
- // pub connect_start: u64,
+ pub connect_start: u64,
pub connect_end: u64,
}
@@ -468,6 +468,7 @@ pub enum ResourceAttribute {
ResponseStart,
RedirectStart(RedirectStartValue),
FetchStart,
+ ConnectStart(u64),
ConnectEnd(u64),
ResponseEnd,
}
@@ -489,6 +490,7 @@ impl ResourceFetchTiming {
response_start: 0,
fetch_start: 0,
redirect_start: 0,
+ connect_start: 0,
connect_end: 0,
response_end: 0,
}
@@ -510,6 +512,7 @@ impl ResourceFetchTiming {
},
},
ResourceAttribute::FetchStart => self.fetch_start = precise_time_ns(),
+ ResourceAttribute::ConnectStart(val) => self.connect_start = val,
ResourceAttribute::ConnectEnd(val) => self.connect_end = val,
ResourceAttribute::ResponseEnd => self.response_end = precise_time_ns(),
}