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

Issue 19866004: Reland "Add a HistogramRecorder class and use cases." (Closed)

Created:
7 years, 5 months ago by lpromero
Modified:
7 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, jar (doing other things), rpetterson, rouslan+spellwatch_chromium.org, asvitkine+watch_chromium.org, groby+spellwatch_chromium.org, erikwright+watch_chromium.org, Ilya Sherman
Visibility:
Public.

Description

Reland "Add a HistogramRecorder class and use cases." This CL adds a utility class to streamline the task of testing that metrics have been updated as expected. Specifically, the HistogramRecorder class allows a client to obtain the differential value of a given histogram in the interval since the given HistogramRecorder instance was created. This reverts commit b957026f43ef9464a8cdd5a240867c807b2281da. BUG=232414 TBR=rsleevi, mark, groby, thakis Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=242121

Patch Set 1 : This patch is a revert of the revert. #

Patch Set 2 : This is the fix. #

Total comments: 13

Patch Set 3 : Review feedback. #

Total comments: 3

Patch Set 4 : Fix an English error. #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -162 lines) Patch
M base/base.gyp View 2 chunks +3 lines, -0 lines 0 comments Download
M base/metrics/statistics_recorder.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
A base/test/histogram_recorder.h View 1 2 3 1 chunk +44 lines, -0 lines 6 comments Download
A base/test/histogram_recorder.cc View 1 1 chunk +52 lines, -0 lines 0 comments Download
A base/test/histogram_recorder_unittest.cc View 1 2 1 chunk +41 lines, -0 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_host_metrics_unittest.cc View 1 4 chunks +36 lines, -68 lines 0 comments Download
M chrome/browser/ui/cocoa/browser/password_generation_bubble_controller_unittest.mm View 1 6 chunks +8 lines, -27 lines 0 comments Download
M net/url_request/url_request_throttler_unittest.cc View 1 6 chunks +18 lines, -64 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Reid Kleckner
This error from URLRequestThrottlerSimulation looks relevant: InvalidRead Invalid read of size 4 disk_cache::Stats::Snapshot(base::HistogramSamples*) const (net/disk_cache/stats.cc:250) ...
7 years, 4 months ago (2013-07-29 16:51:34 UTC) #1
lpromero
On 2013/07/29 16:51:34, Reid Kleckner wrote: > This error from URLRequestThrottlerSimulation looks relevant: > > ...
7 years, 4 months ago (2013-07-29 16:57:12 UTC) #2
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
7 years ago (2013-12-17 13:24:03 UTC) #3
lpromero
I'd like to reland this. Could you review it? Thank you.
7 years ago (2013-12-17 13:54:02 UTC) #4
Reid Kleckner
I can't actually review the patch content, I'm not familiar with the code. I'm just ...
7 years ago (2013-12-17 18:46:13 UTC) #5
lpromero
Hi Reid, Sorry for the mess in the patches. I cleaned all of that. Patch ...
7 years ago (2013-12-17 18:53:15 UTC) #6
ppi
Thanks, Louis! lgtm with nits (note that I am not OWNER of anything relevant). It ...
7 years ago (2013-12-19 16:57:26 UTC) #7
Reid Kleckner
lgtm
7 years ago (2013-12-19 19:20:24 UTC) #8
lpromero
https://codereview.chromium.org/19866004/diff/62001/base/metrics/statistics_recorder.h File base/metrics/statistics_recorder.h (right): https://codereview.chromium.org/19866004/diff/62001/base/metrics/statistics_recorder.h#newcode73 base/metrics/statistics_recorder.h:73: // caller supplied vector (Histograms). Only histograms which have ...
7 years ago (2013-12-20 11:53:43 UTC) #9
blundell
LGTM https://codereview.chromium.org/19866004/diff/82001/base/test/histogram_recorder.h File base/test/histogram_recorder.h (right): https://codereview.chromium.org/19866004/diff/82001/base/test/histogram_recorder.h#newcode35 base/test/histogram_recorder.h:35: // lifecycle. This isntance takes ownership of the ...
7 years ago (2013-12-20 12:29:38 UTC) #10
lpromero
TBR Mark Mentovai for base. TBR groby for spellcheck. TBR Nico for cocoa. TBR Ryan ...
7 years ago (2013-12-20 12:37:10 UTC) #11
lpromero
https://codereview.chromium.org/19866004/diff/82001/base/test/histogram_recorder.h File base/test/histogram_recorder.h (right): https://codereview.chromium.org/19866004/diff/82001/base/test/histogram_recorder.h#newcode35 base/test/histogram_recorder.h:35: // lifecycle. This isntance takes ownership of the samples, ...
7 years ago (2013-12-20 12:37:50 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lpromero@chromium.org/19866004/112001
7 years ago (2013-12-20 12:38:42 UTC) #13
Ryan Sleevi
lgtm
7 years ago (2013-12-20 16:52:39 UTC) #14
commit-bot: I haz the power
Change committed as 242121
7 years ago (2013-12-20 17:46:57 UTC) #15
Mark Mentovai
This doesn’t seems so urgent that it needed to be TBRed. But the followup fixes ...
7 years ago (2013-12-20 18:07:11 UTC) #16
lpromero
https://codereview.chromium.org/19866004/diff/112001/base/test/histogram_recorder.h File base/test/histogram_recorder.h (right): https://codereview.chromium.org/19866004/diff/112001/base/test/histogram_recorder.h#newcode21 base/test/histogram_recorder.h:21: static void Initialize(); On 2013/12/20 18:07:12, Mark Mentovai wrote: ...
7 years ago (2013-12-20 18:22:41 UTC) #17
lpromero
7 years ago (2013-12-20 18:23:04 UTC) #18
Message was sent while issue was closed.
On 2013/12/20 18:22:41, lpromero wrote:
>
https://codereview.chromium.org/19866004/diff/112001/base/test/histogram_reco...
> File base/test/histogram_recorder.h (right):
> 
>
https://codereview.chromium.org/19866004/diff/112001/base/test/histogram_reco...
> base/test/histogram_recorder.h:21: static void Initialize();
> On 2013/12/20 18:07:12, Mark Mentovai wrote:
> > This shouldn’t precede the constructor.
> >
>
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Declar...
> 
> Done.
> 
>
https://codereview.chromium.org/19866004/diff/112001/base/test/histogram_reco...
> base/test/histogram_recorder.h:23: virtual ~HistogramRecorder();
> On 2013/12/20 18:07:12, Mark Mentovai wrote:
> > Why is this virtual? There are no other virtual methods here. This class is
> not
> > a base of any other class. This adds unnecessary indirection.
> 
> Done.
> 
>
https://codereview.chromium.org/19866004/diff/112001/base/test/histogram_reco...
> base/test/histogram_recorder.h:37: std::map<std::string, HistogramSamples*>
> original_samples_;
> On 2013/12/20 18:07:12, Mark Mentovai wrote:
> > Include what you use: #include <string>
> 
> Done.

The feedback is addressed in https://codereview.chromium.org/99553004/

Powered by Google App Engine
This is Rietveld 408576698