|
Use a different algorithm with the low entropy source for field trials.
The new algorithm maps the original 13-bit low entropy source to a
new 13-bit entropy value using a mapping that is shuffled using the
trial name as a seed.
The algorithm is roughly as follows:
Take the low entropy source as an integer between 0-8191.
Generate an identity mapping of size 8192 where mapping[i] == i.
Seed a Mersenne Twister random number generator with the hash of the field trial name.
Use the seeded random number generator to shuffle the mapping array.
Map the low entropy source using the mapping array, i.e. entropy' = mapping[entropy].
Divide the resulting entropy' by 8192 to produce a double in the range of [0, 1) that
will be used for bucketing in field_trial.cc.
The above algorithm improves uniformity over the existing entropy provider when
the 13-bit entropy source is used while still providing very little overlaps of
buckets between different field trials.
Adds third_party library mt19937ar, an implementation of Mersenne Twister, for
the seeded random number generation. This is needed until C++11 becomes available
for use in Chromium, at which point C++11's <random> could be used.
BUG= 143239
TEST=Unit tests. Additionally, verified that the new algorithm produces uniform results
with very little overlap of buckets between different field trials.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=153322
Total comments: 19
Total comments: 17
Total comments: 62
Total comments: 10
Total comments: 12
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1038 lines, -206 lines) |
Patch |
|
M |
.gitignore
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
base/metrics/field_trial.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
5 chunks |
+29 lines, -23 lines |
0 comments
|
Download
|
|
M |
base/metrics/field_trial.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+28 lines, -43 lines |
0 comments
|
Download
|
|
M |
base/metrics/field_trial_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+1 line, -96 lines |
0 comments
|
Download
|
|
M |
chrome/browser/chrome_browser_main.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/chrome_browser_main_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
3 chunks |
+26 lines, -20 lines |
0 comments
|
Download
|
|
M |
chrome/browser/metrics/metrics_service.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+15 lines, -9 lines |
0 comments
|
Download
|
|
M |
chrome/browser/metrics/metrics_service.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
5 chunks |
+14 lines, -7 lines |
0 comments
|
Download
|
|
M |
chrome/chrome_common.gypi
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/chrome_tests.gypi
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/common/DEPS
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
A |
chrome/common/metrics/entropy_provider.h
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+95 lines, -0 lines |
0 comments
|
Download
|
|
A |
chrome/common/metrics/entropy_provider.cc
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+124 lines, -0 lines |
0 comments
|
Download
|
|
A |
chrome/common/metrics/entropy_provider_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+337 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/common/metrics/variations/variations_util_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
chrome_frame/chrome_tab.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
chrome_frame/test/run_all_unittests.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
content/renderer/renderer_main.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
A |
third_party/mt19937ar/LICENSE
|
View
|
|
1 chunk |
+35 lines, -0 lines |
0 comments
|
Download
|
|
A |
third_party/mt19937ar/README.chromium
|
View
|
|
1 chunk |
+19 lines, -0 lines |
0 comments
|
Download
|
|
A |
third_party/mt19937ar/mt19937ar.h
|
View
|
|
1 chunk |
+65 lines, -0 lines |
0 comments
|
Download
|
|
A |
third_party/mt19937ar/mt19937ar.cc
|
View
|
|
1 chunk |
+140 lines, -0 lines |
0 comments
|
Download
|
|
A |
third_party/mt19937ar/mt19937ar.gyp
|
View
|
|
1 chunk |
+19 lines, -0 lines |
0 comments
|
Download
|
|
A |
third_party/mt19937ar/readme-mt.txt
|
View
|
|
1 chunk |
+74 lines, -0 lines |
0 comments
|
Download
|
Total messages: 35 (0 generated)
|