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

Issue 2501723002: Fix random number generation in disk_cache_perftests. (Closed)

Created:
4 years, 1 month ago by gavinp
Modified:
4 years, 1 month ago
Reviewers:
jkarlin
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org, kinuko+cache_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix random number generation in disk_cache_perftests. rand() is not very random on many platforms, and worse yet, RAND_MAX is typically 32,767. Use base::RandInt instead. R=jkarlin@chromium.org BUG=none Committed: https://crrev.com/ae2f89a69441e09e0ff13ed346f61c4f0298913b Cr-Commit-Position: refs/heads/master@{#432188}

Patch Set 1 #

Patch Set 2 : moar #

Total comments: 6

Patch Set 3 : moar #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -17 lines) Patch
M net/disk_cache/disk_cache_perftest.cc View 1 2 6 chunks +7 lines, -17 lines 0 comments Download

Messages

Total messages: 18 (10 generated)
gavinp
PTAL. I came across this during a bunch of upgrades to testing; very frustrating discovery! ...
4 years, 1 month ago (2016-11-14 21:48:12 UTC) #2
gavinp
On 2016/11/14 21:48:12, gavinp wrote: > PTAL. > > I came across this during a ...
4 years, 1 month ago (2016-11-15 00:26:41 UTC) #6
jkarlin
https://codereview.chromium.org/2501723002/diff/20001/net/disk_cache/disk_cache_perftest.cc File net/disk_cache/disk_cache_perftest.cc (right): https://codereview.chromium.org/2501723002/diff/20001/net/disk_cache/disk_cache_perftest.cc#newcode270 net/disk_cache/disk_cache_perftest.cc:270: // We can use form 1 to 4 blocks. ...
4 years, 1 month ago (2016-11-15 12:18:29 UTC) #7
gavinp
I removed that function, it was one line, and it was goofy. Just repeated a ...
4 years, 1 month ago (2016-11-15 15:30:54 UTC) #10
jkarlin
lgtm!
4 years, 1 month ago (2016-11-15 15:47:28 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2501723002/40001
4 years, 1 month ago (2016-11-15 15:49:50 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 1 month ago (2016-11-15 15:55:31 UTC) #16
commit-bot: I haz the power
4 years, 1 month ago (2016-11-15 15:58:55 UTC) #18
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/ae2f89a69441e09e0ff13ed346f61c4f0298913b
Cr-Commit-Position: refs/heads/master@{#432188}

Powered by Google App Engine
This is Rietveld 408576698