Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_ | 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_ |
| 6 #define COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_ | 6 #define COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 int http_response_code; | 58 int http_response_code; |
| 59 // Elapsed time between starting and completing the request. | 59 // Elapsed time between starting and completing the request. |
| 60 base::TimeDelta elapsed; | 60 base::TimeDelta elapsed; |
| 61 // Start time of the request. Encoded as the request age in the final JSON. | 61 // Start time of the request. Encoded as the request age in the final JSON. |
| 62 base::TimeTicks start_time; | 62 base::TimeTicks start_time; |
| 63 // Length of the chain of Domain Reliability uploads leading to this report. | 63 // Length of the chain of Domain Reliability uploads leading to this report. |
| 64 // Zero if the request was not caused by an upload, one if the request was | 64 // Zero if the request was not caused by an upload, one if the request was |
| 65 // caused by an upload that itself contained no beacons caused by uploads, | 65 // caused by an upload that itself contained no beacons caused by uploads, |
| 66 // et cetera. | 66 // et cetera. |
| 67 int upload_depth; | 67 int upload_depth; |
| 68 // "Weight" of this beacon -- the inverse of the sampling rate under which it | |
| 69 // was chosen to be reported. | |
|
jkarlin
2015/12/07 14:57:27
Why inverse? Why not just report the sampling rate
Deprecated (see juliatuttle)
2015/12/07 20:17:57
Done.
| |
| 70 int weight; | |
|
jkarlin
2015/12/07 14:57:27
Why an int? You're losing significant data here.
Deprecated (see juliatuttle)
2015/12/07 20:17:57
In our own tests, we've only ever used things (oth
jkarlin
2015/12/08 19:41:36
But the sample_rate is a double in the range [0,1]
| |
| 68 | 71 |
| 69 // Okay to copy and assign. | 72 // Okay to copy and assign. |
| 70 }; | 73 }; |
| 71 | 74 |
| 72 } // namespace domain_reliability | 75 } // namespace domain_reliability |
| 73 | 76 |
| 74 #endif // COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_ | 77 #endif // COMPONENTS_DOMAIN_RELIABILITY_BEACON_H_ |
| OLD | NEW |