Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Side by Side Diff: net/nqe/network_quality_estimator.h

Issue 2107243003: NQE: Record correlation metric in UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed kundaji's comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ 5 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_
6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 EXTERNAL_ESTIMATE_PROVIDER_STATUS_CALLBACK, 495 EXTERNAL_ESTIMATE_PROVIDER_STATUS_CALLBACK,
496 EXTERNAL_ESTIMATE_PROVIDER_STATUS_RTT_AVAILABLE, 496 EXTERNAL_ESTIMATE_PROVIDER_STATUS_RTT_AVAILABLE,
497 EXTERNAL_ESTIMATE_PROVIDER_STATUS_DOWNLINK_BANDWIDTH_AVAILABLE, 497 EXTERNAL_ESTIMATE_PROVIDER_STATUS_DOWNLINK_BANDWIDTH_AVAILABLE,
498 EXTERNAL_ESTIMATE_PROVIDER_STATUS_BOUNDARY 498 EXTERNAL_ESTIMATE_PROVIDER_STATUS_BOUNDARY
499 }; 499 };
500 500
501 // Records the metrics related to external estimate provider. 501 // Records the metrics related to external estimate provider.
502 void RecordExternalEstimateProviderMetrics( 502 void RecordExternalEstimateProviderMetrics(
503 NQEExternalEstimateProviderStatus status) const; 503 NQEExternalEstimateProviderStatus status) const;
504 504
505 // Records correlation metric that can be used for computing the correlation
bengr 2016/07/08 16:49:52 Records -> Records a HTTP -> HTTP-layer transport
tbansal1 2016/07/08 17:45:51 Done.
506 // between HTTP RTT, transport RTT, throughput and the time taken to fetch
507 // |request|.
508 void RecordCorrelationMetric(const URLRequest& request) const;
509
505 // Determines if the requests to local host can be used in estimating the 510 // Determines if the requests to local host can be used in estimating the
506 // network quality. Set to true only for tests. 511 // network quality. Set to true only for tests.
507 bool use_localhost_requests_; 512 bool use_localhost_requests_;
508 513
509 // Determines if the responses smaller than |kMinTransferSizeInBytes| 514 // Determines if the responses smaller than |kMinTransferSizeInBytes|
510 // or shorter than |kMinTransferSizeInBytes| can be used in estimating the 515 // or shorter than |kMinTransferSizeInBytes| can be used in estimating the
511 // network quality. Set to true only for tests. 516 // network quality. Set to true only for tests.
512 bool use_small_responses_; 517 bool use_small_responses_;
513 518
514 // The factor by which the weight of an observation reduces every second. 519 // The factor by which the weight of an observation reduces every second.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 // |downstream_throughput_kbps_observations_|, which are later used for 602 // |downstream_throughput_kbps_observations_|, which are later used for
598 // estimating the throughput. 603 // estimating the throughput.
599 std::unique_ptr<nqe::internal::ThroughputAnalyzer> throughput_analyzer_; 604 std::unique_ptr<nqe::internal::ThroughputAnalyzer> throughput_analyzer_;
600 605
601 // Current effective connection type. It is updated on connection change 606 // Current effective connection type. It is updated on connection change
602 // events. It is also updated every time there is network traffic (provided 607 // events. It is also updated every time there is network traffic (provided
603 // the last computation was more than 608 // the last computation was more than
604 // |effective_connection_type_recomputation_interval_| ago). 609 // |effective_connection_type_recomputation_interval_| ago).
605 EffectiveConnectionType effective_connection_type_; 610 EffectiveConnectionType effective_connection_type_;
606 611
612 // Correlation UMA is recorded with |correlation_logging_probability_|
613 // probability. e.g., if it is 0.0, then the UMA will never be recorded. On
614 // the other hand, if it is 1.0, then it will be recorded for all valid HTTP
615 // requests.
bengr 2016/07/08 16:49:52 Why is it not recorded for all requests? If this i
tbansal1 2016/07/08 17:45:51 Added more comments.
616 const double correlation_logging_probability_;
bengr 2016/07/08 16:49:52 rename: correlation_uma_reporting_probability_;
tbansal1 2016/07/08 17:45:51 Done.
617
607 base::ThreadChecker thread_checker_; 618 base::ThreadChecker thread_checker_;
608 619
609 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; 620 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_;
610 621
611 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); 622 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator);
612 }; 623 };
613 624
614 } // namespace net 625 } // namespace net
615 626
616 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ 627 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_
OLDNEW
« no previous file with comments | « no previous file | net/nqe/network_quality_estimator.cc » ('j') | net/nqe/network_quality_estimator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698