-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add URLSessionTaskMetrics #2886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
@swift-ci please test Linux platform |
@@ -128,6 +128,8 @@ public protocol URLSessionTaskDelegate : URLSessionDelegate { | |||
func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) | |||
|
|||
func urlSession(_ session: URLSession, task: URLSessionTask, willBeginDelayedRequest request: URLRequest, completionHandler: @escaping (URLSession.DelayedRequestDisposition, URLRequest?) -> Void) | |||
|
|||
func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: formatting seems to be inconsistent here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other formatting is inconsistent: the first two methods are indented 4 spaces, the others 5. 4 seems correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, the nit is about the rest of the code being inconsistent, not yours 😁
Good opportunity to make the rest of the functions in this protocol use 4-spaces indentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Fixed all of the spacing issues in this file in 75bcd79.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This comment has been minimized.
This comment has been minimized.
1 similar comment
@swift-ci please test |
Starts fixing SR-11518 and makes a port of Alamofire much easier.
This PR adds
URLSessionTaskMetrics
and its associated types (URLSessionTaskTransactionMetrics
, etc.), as well as theurlSession(_:task:didFinishCollecting:)
URLSessionTaskDelegate
method. It does not include: