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

Issue 1090683003: Alternative Multi-dimensional Rappor (Closed)

Created:
5 years, 8 months ago by Steven Holte
Modified:
5 years, 7 months ago
CC:
chromium-reviews, asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Multi-dimensional Rappor Implementation This implements support for Rappor metrics which contain multiple fields that support correlation analysis. Example: scoped_ptr<Sample> sample = rappor_service->CreateSample(COARSE_RAPPOR_TYPE); sample->SetStringField("Domain", "google.com"); sample->SetFlagsField("Flags", 0x10, 8 /* # of bits */); rappor_service->RecordSampleObj("MyMetric", sample.Pass()); This change also removes metric_name from the personalization string for the PRR. This means that two different metrics which report the same value will use the same PRR, which will improve privacy when multiple metrics report the same value. BUG=451647 Committed: https://crrev.com/feb4e55d126e711b0a5e9dd321371a4923768346 Cr-Commit-Position: refs/heads/master@{#327207}

Patch Set 1 #

Total comments: 29

Patch Set 2 : Address comments #

Patch Set 3 : Make flags size part of API #

Patch Set 4 : Add comments #

Patch Set 5 : Exporting and Test #

Total comments: 12

Patch Set 6 : Sampler test #

Total comments: 21

Patch Set 7 : Address comments #

Total comments: 18

Patch Set 8 : Address Comments #

Patch Set 9 : Fix test #

Patch Set 10 : Fix GN Build #

Patch Set 11 : Fix android build #

Patch Set 12 : Use 64-bit shift #

Unified diffs Side-by-side diffs Delta from patch set Stats (+524 lines, -46 lines) Patch
M components/components_tests.gyp View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M components/rappor.gypi View 1 chunk +6 lines, -0 lines 0 comments Download
M components/rappor/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M components/rappor/bloom_filter.h View 1 chunk +11 lines, -0 lines 0 comments Download
M components/rappor/bloom_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +30 lines, -4 lines 0 comments Download
M components/rappor/bloom_filter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +11 lines, -0 lines 0 comments Download
M components/rappor/rappor_metric.cc View 1 2 chunks +2 lines, -29 lines 0 comments Download
M components/rappor/rappor_service.h View 1 2 3 4 5 6 7 3 chunks +24 lines, -0 lines 0 comments Download
M components/rappor/rappor_service.cc View 1 2 3 4 5 6 3 chunks +33 lines, -13 lines 0 comments Download
M components/rappor/rappor_service_unittest.cc View 1 2 3 4 5 6 2 chunks +21 lines, -0 lines 0 comments Download
A components/rappor/reports.h View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download
A components/rappor/reports.cc View 1 1 chunk +52 lines, -0 lines 0 comments Download
A components/rappor/sample.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +70 lines, -0 lines 0 comments Download
A components/rappor/sample.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +77 lines, -0 lines 0 comments Download
A components/rappor/sampler.h View 1 2 3 4 5 1 chunk +53 lines, -0 lines 0 comments Download
A components/rappor/sampler.cc View 1 2 3 4 5 1 chunk +39 lines, -0 lines 0 comments Download
A components/rappor/sampler_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +60 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (10 generated)
Steven Holte
This is an alternative implementation of multi-dimensional rappors (from https://codereview.chromium.org/1058333002/) This one would use the ...
5 years, 8 months ago (2015-04-15 21:14:24 UTC) #2
Alexei Svitkine (slow)
On 2015/04/15 21:14:24, Steven Holte wrote: > This is an alternative implementation of multi-dimensional rappors ...
5 years, 8 months ago (2015-04-15 21:21:06 UTC) #3
Steven Holte
On 2015/04/15 21:21:06, Alexei Svitkine wrote: > On 2015/04/15 21:14:24, Steven Holte wrote: > > ...
5 years, 8 months ago (2015-04-15 21:39:39 UTC) #4
Alexei Svitkine (slow)
https://codereview.chromium.org/1090683003/diff/1/components/rappor/bloom_filter.cc File components/rappor/bloom_filter.cc (right): https://codereview.chromium.org/1090683003/diff/1/components/rappor/bloom_filter.cc#newcode64 components/rappor/bloom_filter.cc:64: } // namespace internal https://codereview.chromium.org/1090683003/diff/1/components/rappor/reports.cc File components/rappor/reports.cc (right): https://codereview.chromium.org/1090683003/diff/1/components/rappor/reports.cc#newcode26 ...
5 years, 8 months ago (2015-04-16 15:09:44 UTC) #5
Nathan Parker
Steven -- This interface looks great to me, and does everything we need for a ...
5 years, 8 months ago (2015-04-22 15:47:10 UTC) #7
Steven Holte
https://codereview.chromium.org/1090683003/diff/1/components/rappor/bloom_filter.cc File components/rappor/bloom_filter.cc (right): https://codereview.chromium.org/1090683003/diff/1/components/rappor/bloom_filter.cc#newcode64 components/rappor/bloom_filter.cc:64: } On 2015/04/16 15:09:43, Alexei Svitkine wrote: > // ...
5 years, 8 months ago (2015-04-22 19:24:28 UTC) #8
Alexei Svitkine (slow)
https://codereview.chromium.org/1090683003/diff/1/components/rappor/sample.cc File components/rappor/sample.cc (right): https://codereview.chromium.org/1090683003/diff/1/components/rappor/sample.cc#newcode41 components/rappor/sample.cc:41: sizes[fieldName] = parameters_.flag_bytes; On 2015/04/22 19:24:28, Steven Holte wrote: ...
5 years, 8 months ago (2015-04-22 20:26:30 UTC) #9
Steven Holte
On 2015/04/22 20:26:30, Alexei Svitkine wrote: > https://codereview.chromium.org/1090683003/diff/1/components/rappor/sample.cc > File components/rappor/sample.cc (right): > > https://codereview.chromium.org/1090683003/diff/1/components/rappor/sample.cc#newcode41 ...
5 years, 8 months ago (2015-04-22 20:52:31 UTC) #10
Alexei Svitkine (slow)
looking good, some more comments https://codereview.chromium.org/1090683003/diff/80001/components/rappor/rappor_service_unittest.cc File components/rappor/rappor_service_unittest.cc (right): https://codereview.chromium.org/1090683003/diff/80001/components/rappor/rappor_service_unittest.cc#newcode107 components/rappor/rappor_service_unittest.cc:107: uint64_t urlHash = metrics::HashMetricName("ObjMetric.Url"); ...
5 years, 8 months ago (2015-04-22 21:00:13 UTC) #11
Steven Holte
https://codereview.chromium.org/1090683003/diff/80001/components/rappor/rappor_service_unittest.cc File components/rappor/rappor_service_unittest.cc (right): https://codereview.chromium.org/1090683003/diff/80001/components/rappor/rappor_service_unittest.cc#newcode107 components/rappor/rappor_service_unittest.cc:107: uint64_t urlHash = metrics::HashMetricName("ObjMetric.Url"); On 2015/04/22 21:00:13, Alexei Svitkine ...
5 years, 8 months ago (2015-04-22 21:59:33 UTC) #12
Alexei Svitkine (slow)
https://codereview.chromium.org/1090683003/diff/100001/components/rappor/bloom_filter.cc File components/rappor/bloom_filter.cc (right): https://codereview.chromium.org/1090683003/diff/100001/components/rappor/bloom_filter.cc#newcode52 components/rappor/bloom_filter.cc:52: DCHECK_LE(bytes_size, 8u); Add a comment above this check (i.e. ...
5 years, 8 months ago (2015-04-23 21:42:34 UTC) #13
Steven Holte
https://codereview.chromium.org/1090683003/diff/100001/components/rappor/bloom_filter.cc File components/rappor/bloom_filter.cc (right): https://codereview.chromium.org/1090683003/diff/100001/components/rappor/bloom_filter.cc#newcode52 components/rappor/bloom_filter.cc:52: DCHECK_LE(bytes_size, 8u); On 2015/04/23 21:42:34, Alexei Svitkine wrote: > ...
5 years, 8 months ago (2015-04-24 16:59:06 UTC) #14
Alexei Svitkine (slow)
LGTM % remaining comments. https://codereview.chromium.org/1090683003/diff/100001/components/rappor/rappor_metric.cc File components/rappor/rappor_metric.cc (right): https://codereview.chromium.org/1090683003/diff/100001/components/rappor/rappor_metric.cc#newcode42 components/rappor/rappor_metric.cc:42: return internal::GenerateReport(secret, parameters(), bytes()); On ...
5 years, 8 months ago (2015-04-24 18:10:02 UTC) #15
Nathan Parker
lgtm https://codereview.chromium.org/1090683003/diff/120001/components/rappor/rappor_service.h File components/rappor/rappor_service.h (right): https://codereview.chromium.org/1090683003/diff/120001/components/rappor/rappor_service.h#newcode78 components/rappor/rappor_service.h:78: // rappor_service->RecordSample("MyMetric", sample.Pass()); Can you add comment that ...
5 years, 8 months ago (2015-04-24 18:26:25 UTC) #16
Steven Holte
https://codereview.chromium.org/1090683003/diff/120001/components/rappor/bloom_filter.cc File components/rappor/bloom_filter.cc (right): https://codereview.chromium.org/1090683003/diff/120001/components/rappor/bloom_filter.cc#newcode19 components/rappor/bloom_filter.cc:19: return index; On 2015/04/24 18:10:01, Alexei Svitkine wrote: > ...
5 years, 8 months ago (2015-04-24 18:39:57 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1090683003/160001
5 years, 8 months ago (2015-04-27 20:55:57 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/82268)
5 years, 8 months ago (2015-04-27 21:15:45 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1090683003/200001
5 years, 8 months ago (2015-04-27 21:59:22 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/52718)
5 years, 8 months ago (2015-04-27 22:35:17 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1090683003/220001
5 years, 8 months ago (2015-04-27 22:51:00 UTC) #30
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 8 months ago (2015-04-28 01:05:08 UTC) #31
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/feb4e55d126e711b0a5e9dd321371a4923768346 Cr-Commit-Position: refs/heads/master@{#327207}
5 years, 8 months ago (2015-04-28 01:06:30 UTC) #32
brucedawson
This CL triggered a new /analyze warning which looks like it is a real bug. ...
5 years, 7 months ago (2015-04-28 23:30:31 UTC) #33
Steven Holte
5 years, 7 months ago (2015-04-29 01:10:54 UTC) #34
Message was sent while issue was closed.
On 2015/04/28 23:30:31, brucedawson wrote:
> This CL triggered a new /analyze warning which looks like it is a real bug.
The
> warning is:
> 
> src\components\rappor\sample.cc(64) : warning C6297: Arithmetic overflow: 
> 32-bit value is shifted, then cast to 64-bit value.  Results might not be an
> expected value.
> 
> The line of code is:
> 
>     uint64_t byte_mask = 0xff << shift;
> 
> This code will fail (result might not be an expected value) if shift is
greater
> than 24. It looks like shift is intended to be as large as 56. Presumably
either
> the 0xff constant should be a uint64_t constant, or else byte_mask should be a
> uint32_t variable.
> 
> Something like this will fix the code:
> 
>     uint64_t byte_mask = uint64_t(0xff) << shift;

Created a CL to fix and test this, but awkwardly it works fine in my local linux
build without the cast.
https://codereview.chromium.org/1112003002

Powered by Google App Engine
This is Rietveld 408576698