-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to address infamous issue #47 (issue 30 in owncloud/ios-app#237…
…) by trying to limit background NSURLSession usage to those times where a transfer's duration will likely exceed the app's background time: - OCHTTP - addition of OCHTTPPipelineTaskMetrics to record performance metrics of - detailed times (using NSURLSessionTaskMetrics) - traffic (from NSURLSessionTask) - hostname + timestamp - OCHTTPPipelineTask gets new .metrics property to keep an associated OCHTTPPipelineTaskMetrics object - OCHTTPPipeline support for OCHTTPPipelineTaskMetrics - takes and keeps OCHTTPPipelineTaskMetrics internally - only records whose net transfer time exceeded a threshold (0.01 seconds atm) - only holds onto records for 10 minutes - can provide estimates on - how long a given HTTP request will take to complete before sending it - how confident it is about that estimate - OCConnection - new method to estimate transfer times for requests - queries longLived and command pipelines under the hood and uses the estimate with the higher confidence - new method to provide a pipeline depending on estimated transfer time - will return the command pipeline (typically backed by a local NSURLSession) for requests that are likely to finish within 2 minutes - will return the longlived pipeline (typically backed by a background NSURLSession) for - requests that are estimated to take longer than 2 minutes - requests whose estimation has a confidence below 15% - requests where no estimate is available - uploads and downloads now dispatch their requests to different pipelines depending on estimated transfer time
- Loading branch information
1 parent
ed8dab0
commit cead9cf
Showing
9 changed files
with
494 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.