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

Issue 794493002: Add UMA Histogram Manager to Cronet. (Closed)

Created:
6 years ago by ramant (doing other things)
Modified:
6 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, Ryan Hamilton
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add UMA Histogram Manager to Cronet. Part of change to collect, upload and expose histogram data for Cronet. BUG=441466 Committed: https://crrev.com/4eb0fd47de0736f3f4c970e8d7f8813ef2177886 Cr-Commit-Position: refs/heads/master@{#308239} Committed: https://crrev.com/7254696a81e31cc34a509a692c145690c4e58755 Cr-Commit-Position: refs/heads/master@{#308427}

Patch Set 1 #

Total comments: 30

Patch Set 2 : Fixed comments in Patch Set 1 #

Total comments: 5

Patch Set 3 : fixed comments for Patch Set 2 #

Total comments: 10

Patch Set 4 : Added end to end unittest #

Total comments: 11

Patch Set 5 : moved histogram_manager_unittest to components/metrics #

Total comments: 8

Patch Set 6 : #

Total comments: 2

Patch Set 7 : Fix build errors #

Total comments: 14

Patch Set 8 : removed code that uses return value optimization #

Total comments: 4

Patch Set 9 : Fixed flaky histogram_manager_unittest #

Patch Set 10 : fixed a bug in histogram_manager_unittest #

Patch Set 11 : use lazy_instance to avoid pulling in AnnotateHappensAfter into cronet #

Patch Set 12 : added dynamic_annotations.gyp #

Patch Set 13 : disabled flaky HistogramBucketFields unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+481 lines, -30 lines) Patch
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M components/cronet.gypi View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +6 lines, -0 lines 0 comments Download
M components/cronet/android/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M components/cronet/android/cronet_loader.cc View 2 chunks +2 lines, -0 lines 0 comments Download
A components/cronet/android/histogram_manager.h View 1 2 3 4 5 6 1 chunk +16 lines, -0 lines 0 comments Download
A components/cronet/android/histogram_manager.cc View 1 2 3 4 5 6 7 1 chunk +29 lines, -0 lines 0 comments Download
A components/cronet/android/java/src/org/chromium/net/HistogramManager.java View 1 chunk +25 lines, -0 lines 0 comments Download
A components/cronet/android/test/javatests/src/org/chromium/cronet_test_apk/HistogramManagerTest.java View 1 2 3 4 5 6 7 1 chunk +34 lines, -0 lines 0 comments Download
M components/cronet/android/test/src/org/chromium/cronet_test_apk/CronetTestActivity.java View 2 chunks +3 lines, -0 lines 0 comments Download
M components/metrics.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M components/metrics/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
A components/metrics/histogram_encoder.h View 1 2 3 4 5 6 7 1 chunk +30 lines, -0 lines 0 comments Download
A components/metrics/histogram_encoder.cc View 1 2 3 4 5 6 7 1 chunk +55 lines, -0 lines 0 comments Download
A components/metrics/histogram_encoder_unittest.cc View 1 2 3 4 1 chunk +72 lines, -0 lines 0 comments Download
A components/metrics/histogram_manager.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +62 lines, -0 lines 0 comments Download
A components/metrics/histogram_manager.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +67 lines, -0 lines 0 comments Download
A components/metrics/histogram_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +58 lines, -0 lines 0 comments Download
M components/metrics/metrics_log.cc View 1 2 3 4 2 chunks +2 lines, -30 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 71 (23 generated)
ramant (doing other things)
Work in progress. Fixes comments in https://codereview.chromium.org/769873003/
6 years ago (2014-12-10 03:41:31 UTC) #2
mef
Raman, thanks a lot for picking this up! Alexei, could you take a look, this ...
6 years ago (2014-12-10 15:06:52 UTC) #3
Alexei Svitkine (slow)
Thanks, looks very good - a few more comments. https://codereview.chromium.org/794493002/diff/1/components/cronet/android/histogram_manager.cc File components/cronet/android/histogram_manager.cc (right): https://codereview.chromium.org/794493002/diff/1/components/cronet/android/histogram_manager.cc#newcode17 components/cronet/android/histogram_manager.cc:17: ...
6 years ago (2014-12-10 15:19:31 UTC) #4
Alexei Svitkine (slow)
In terms of testing, I suggest having a unit test that does the following: Logs ...
6 years ago (2014-12-10 15:21:08 UTC) #5
Alexei Svitkine (slow)
Looks great, just a few more things. https://codereview.chromium.org/794493002/diff/20001/components/cronet/android/histogram_manager.cc File components/cronet/android/histogram_manager.cc (right): https://codereview.chromium.org/794493002/diff/20001/components/cronet/android/histogram_manager.cc#newcode69 components/cronet/android/histogram_manager.cc:69: if (histogram_manager->uma_proto().SerializeToArray(&data[0], ...
6 years ago (2014-12-10 21:50:17 UTC) #6
ramant (doing other things)
Hi Alexei, Implemented all the changes you have suggested. This code is still not ready. ...
6 years ago (2014-12-10 22:27:51 UTC) #7
Alexei Svitkine (slow)
Will wait for the test, but a few more comments in the meanwhile. https://codereview.chromium.org/794493002/diff/40001/components/cronet/android/histogram_manager.h File ...
6 years ago (2014-12-10 22:36:37 UTC) #8
ramant (doing other things)
Added end to end unit test. Tested it my moving all the code into components/metrics ...
6 years ago (2014-12-11 02:21:53 UTC) #14
mef
https://codereview.chromium.org/794493002/diff/160001/components/cronet/android/histogram_manager_unittest.cc File components/cronet/android/histogram_manager_unittest.cc (right): https://codereview.chromium.org/794493002/diff/160001/components/cronet/android/histogram_manager_unittest.cc#newcode31 components/cronet/android/histogram_manager_unittest.cc:31: TEST_F(HistogramManagerTest, HistogramBucketFields) { On 2014/12/11 02:21:53, ramant wrote: > ...
6 years ago (2014-12-11 15:35:40 UTC) #15
Alexei Svitkine (slow)
https://codereview.chromium.org/794493002/diff/40001/components/metrics/metrics_log.cc File components/metrics/metrics_log.cc (right): https://codereview.chromium.org/794493002/diff/40001/components/metrics/metrics_log.cc#newcode182 components/metrics/metrics_log.cc:182: metrics::RecordHistogramDelta(histogram_name, snapshot, &uma_proto_); On 2014/12/11 02:21:53, ramant wrote: > ...
6 years ago (2014-12-11 15:38:58 UTC) #16
mef
On 2014/12/11 15:38:58, asvitkine (OOO Dec13 - Jan4) wrote: > https://codereview.chromium.org/794493002/diff/40001/components/metrics/metrics_log.cc > File components/metrics/metrics_log.cc (right): ...
6 years ago (2014-12-11 15:48:24 UTC) #17
Alexei Svitkine (slow)
Can the test have JNI? If so, it could just call C++ test code... On ...
6 years ago (2014-12-11 16:05:16 UTC) #18
Alexei Svitkine (slow)
Alternatively, does Cronet code get built as part of the Chromium tree? If so, what ...
6 years ago (2014-12-11 16:06:16 UTC) #19
mef
On 2014/12/11 16:06:16, asvitkine (OOO Dec13 - Jan4) wrote: > Alternatively, does Cronet code get ...
6 years ago (2014-12-11 16:19:33 UTC) #20
Alexei Svitkine (slow)
On Thu, Dec 11, 2014 at 11:19 AM, <mef@chromium.org> wrote: > On 2014/12/11 16:06:16, asvitkine ...
6 years ago (2014-12-11 16:26:56 UTC) #21
Alexei Svitkine (slow)
Can you set a BUG= for this? https://codereview.chromium.org/794493002/diff/180001/components/cronet/android/histogram_manager.cc File components/cronet/android/histogram_manager.cc (right): https://codereview.chromium.org/794493002/diff/180001/components/cronet/android/histogram_manager.cc#newcode22 components/cronet/android/histogram_manager.cc:22: HistogramManager::HistogramManager() { ...
6 years ago (2014-12-11 20:09:09 UTC) #22
ramant (doing other things)
Hi Alexei, I am running blind with cronet changes. I haven't tested them (working with ...
6 years ago (2014-12-11 20:23:53 UTC) #24
Alexei Svitkine (slow)
LGTM % comment below Also, please associate this CL with a crbug.com via BUG= https://codereview.chromium.org/794493002/diff/220001/components/metrics/histogram_manager.h ...
6 years ago (2014-12-11 20:29:28 UTC) #25
ramant (doing other things)
https://codereview.chromium.org/794493002/diff/220001/components/metrics/histogram_manager.h File components/metrics/histogram_manager.h (right): https://codereview.chromium.org/794493002/diff/220001/components/metrics/histogram_manager.h#newcode24 components/metrics/histogram_manager.h:24: class HistogramManager : public base::HistogramFlattener { On 2014/12/11 20:29:28, ...
6 years ago (2014-12-11 23:10:42 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/794493002/300001
6 years ago (2014-12-11 23:10:58 UTC) #31
mef
Mostly nits and questions. I assume that components_unittests succeed. Do I understand correctly that there ...
6 years ago (2014-12-11 23:11:41 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/29856)
6 years ago (2014-12-11 23:33:13 UTC) #34
ramant (doing other things)
PTAL. https://codereview.chromium.org/794493002/diff/300001/components/components_tests.gyp File components/components_tests.gyp (right): https://codereview.chromium.org/794493002/diff/300001/components/components_tests.gyp#newcode160 components/components_tests.gyp:160: 'metrics/histogram_encoder_unittest.cc', On 2014/12/11 23:11:40, mef wrote: > is ...
6 years ago (2014-12-12 02:43:05 UTC) #35
ramant (doing other things)
On 2014/12/11 23:11:41, mef wrote: > Mostly nits and questions. I assume that components_unittests succeed. ...
6 years ago (2014-12-12 03:27:54 UTC) #36
ramant (doing other things)
On 2014/12/12 03:27:54, ramant wrote: > On 2014/12/11 23:11:41, mef wrote: > > Mostly nits ...
6 years ago (2014-12-12 03:41:58 UTC) #37
mef
lgtm, thanks a lot for doing this!
6 years ago (2014-12-12 15:22:46 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/794493002/320001
6 years ago (2014-12-12 15:35:18 UTC) #40
Alexei Svitkine (slow)
I have a suspicion about the test failures. I think the specific test is flaky ...
6 years ago (2014-12-12 15:54:02 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/41561)
6 years ago (2014-12-12 15:55:02 UTC) #43
Alexei Svitkine (slow)
https://codereview.chromium.org/794493002/diff/320001/components/metrics/histogram_manager_unittest.cc File components/metrics/histogram_manager_unittest.cc (right): https://codereview.chromium.org/794493002/diff/320001/components/metrics/histogram_manager_unittest.cc#newcode22 components/metrics/histogram_manager_unittest.cc:22: EXPECT_LT(0u, data.size()); I thought I mention this in a ...
6 years ago (2014-12-12 16:57:01 UTC) #44
ramant (doing other things)
https://codereview.chromium.org/794493002/diff/320001/components/metrics/histogram_manager_unittest.cc File components/metrics/histogram_manager_unittest.cc (right): https://codereview.chromium.org/794493002/diff/320001/components/metrics/histogram_manager_unittest.cc#newcode22 components/metrics/histogram_manager_unittest.cc:22: EXPECT_LT(0u, data.size()); On 2014/12/12 16:57:00, asvitkine (OOO until Jan4) ...
6 years ago (2014-12-12 19:01:26 UTC) #45
Alexei Svitkine (slow)
LGTM!
6 years ago (2014-12-12 19:30:01 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/794493002/360001
6 years ago (2014-12-12 19:30:29 UTC) #48
ramant (doing other things)
On 2014/12/12 19:30:01, asvitkine (OOO until Jan4) wrote: > LGTM! Many many thanks Alexei and ...
6 years ago (2014-12-12 19:30:50 UTC) #49
mef
On 2014/12/12 19:30:50, ramant wrote: > On 2014/12/12 19:30:01, asvitkine (OOO until Jan4) wrote: > ...
6 years ago (2014-12-12 19:35:55 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/30543)
6 years ago (2014-12-12 20:06:09 UTC) #52
mef
still lgtm
6 years ago (2014-12-12 22:39:47 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/794493002/380001
6 years ago (2014-12-12 22:41:49 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/30640)
6 years ago (2014-12-12 23:18:20 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/794493002/400001
6 years ago (2014-12-12 23:31:28 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel/builds/17988)
6 years ago (2014-12-13 02:16:59 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/794493002/400001
6 years ago (2014-12-13 02:20:26 UTC) #63
commit-bot: I haz the power
Committed patchset #12 (id:400001)
6 years ago (2014-12-13 03:27:47 UTC) #64
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/4eb0fd47de0736f3f4c970e8d7f8813ef2177886 Cr-Commit-Position: refs/heads/master@{#308239}
6 years ago (2014-12-13 03:28:30 UTC) #65
Andre
HistogramManagerBucketFields times out on Win7 Tests. https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/33548 Reverting, https://codereview.chromium.org/800363002.
6 years ago (2014-12-15 05:19:51 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/794493002/420001
6 years ago (2014-12-15 19:32:40 UTC) #69
commit-bot: I haz the power
Committed patchset #13 (id:420001)
6 years ago (2014-12-15 21:42:20 UTC) #70
commit-bot: I haz the power
6 years ago (2014-12-15 21:43:08 UTC) #71
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/7254696a81e31cc34a509a692c145690c4e58755
Cr-Commit-Position: refs/heads/master@{#308427}

Powered by Google App Engine
This is Rietveld 408576698