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

Issue 3171023: Add weekly crash counters, refactor metrics_daemon, respect opt-in in library. (Closed)

Created:
10 years, 4 months ago by kmixter1
Modified:
9 years, 7 months ago
Reviewers:
petkov
CC:
chromium-os-reviews_chromium.org, petkov, Luigi Semenzato, sosa
Base URL:
http://src.chromium.org/git/metrics.git
Visibility:
Public.

Description

Add weekly crash counters, refactor metrics_daemon, respect opt-in in library. BUG=5340, 5814 Change-Id: I2c207055f1ebe48051193395e2dbe38d9140b025

Patch Set 1 #

Patch Set 2 : Fix bug #

Patch Set 3 : Untabify #

Total comments: 15

Patch Set 4 : Added a few more tests, simplified filename scheme #

Total comments: 7

Patch Set 5 : Keep all metrics counters in a map and update them frequently #

Total comments: 5

Patch Set 6 : Respond to review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+660 lines, -303 lines) Patch
M c_metrics_library.h View 1 2 1 chunk +8 lines, -4 lines 0 comments Download
M c_metrics_library.cc View 1 2 2 chunks +11 lines, -4 lines 0 comments Download
M counter.h View 1 2 3 4 5 7 chunks +107 lines, -22 lines 0 comments Download
M counter.cc View 1 2 3 4 4 chunks +49 lines, -12 lines 0 comments Download
M counter_mock.h View 1 2 3 4 3 chunks +13 lines, -1 line 0 comments Download
M counter_test.cc View 1 2 3 4 6 chunks +89 lines, -17 lines 0 comments Download
M metrics_daemon.h View 1 2 3 4 5 8 chunks +42 lines, -56 lines 0 comments Download
M metrics_daemon.cc View 1 2 3 4 5 10 chunks +102 lines, -124 lines 0 comments Download
M metrics_daemon_test.cc View 1 2 3 4 15 chunks +124 lines, -58 lines 0 comments Download
M metrics_library.h View 1 2 3 3 chunks +11 lines, -0 lines 0 comments Download
M metrics_library.cc View 1 2 3 3 chunks +23 lines, -5 lines 0 comments Download
M metrics_library_test.cc View 6 chunks +81 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
kmixter1
10 years, 4 months ago (2010-08-24 00:33:05 UTC) #1
petkov
Some nits and a suggestion for some more cleanup. http://codereview.chromium.org/3171023/diff/4001/5004 File counter.h (right): http://codereview.chromium.org/3171023/diff/4001/5004#newcode37 counter.h:37: ...
10 years, 4 months ago (2010-08-24 06:13:29 UTC) #2
petkov
This CL doesn't set epoch based on OS version, right? http://codereview.chromium.org/3171023/diff/4001/5004 File counter.h (right): http://codereview.chromium.org/3171023/diff/4001/5004#newcode37 ...
10 years, 4 months ago (2010-08-24 16:42:45 UTC) #3
kmixter1
PTAL. Responded to comments, added a few more tests, simplified the file name scheme like ...
10 years, 4 months ago (2010-08-25 01:22:17 UTC) #4
petkov
metrics_daemon doesn't use epoch_start in this CL, right? http://codereview.chromium.org/3171023/diff/13001/2005 File counter.h (right): http://codereview.chromium.org/3171023/diff/13001/2005#newcode283 counter.h:283: static ...
10 years, 4 months ago (2010-08-25 16:07:35 UTC) #5
kmixter1
Using maps now to store all frequency counters which should simplify adding new ones. Also ...
10 years, 4 months ago (2010-08-26 18:52:31 UTC) #6
petkov
10 years, 4 months ago (2010-08-26 20:46:14 UTC) #7
A few more questions/comments, LGTM otherwise.

Btw, it might have been good to split such changes into separate CLs -- for
example, the AreMetricsAllowed change can easily be separated (and could have
been checked in already)...

http://codereview.chromium.org/3171023/diff/19001/20004
File counter.h (right):

http://codereview.chromium.org/3171023/diff/19001/20004#newcode179
counter.h:179: // Initializes the counter by providing the persistent storage
Maybe specify somewheret that this creates/sends regular/exponential histograms
(rather then linear/enum).

http://codereview.chromium.org/3171023/diff/19001/20004#newcode182
counter.h:182: //
remove empty //

http://codereview.chromium.org/3171023/diff/19001/20007
File metrics_daemon.cc (right):

http://codereview.chromium.org/3171023/diff/19001/20007#newcode237
metrics_daemon.cc:237: scoped_ptr<chromeos_metrics::TaggedCounterReporter>
reporter(
scoped_ptr here seems unnecessary, right? given that you're releasing it to the
FrequencyCounter right away.

http://codereview.chromium.org/3171023/diff/19001/20007#newcode245
metrics_daemon.cc:245: scoped_ptr<chromeos_metrics::FrequencyCounter>
new_counter(
unnecessary scoped_ptr?

http://codereview.chromium.org/3171023/diff/19001/20007#newcode275
metrics_daemon.cc:275: frequency_counters_.clear();
How about moving this and the current destructor code into a separate
DeleteFrequencyCounters method and invoke that method both from here and from
the destructor?

Powered by Google App Engine
This is Rietveld 408576698