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

Issue 2731008: Implement a persistent storage aggregation counter class. (Closed)

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

Description

Implement a persistent storage aggregation counter class. This class is currently used to aggregate the active daily use time but can also be used to aggregate other data (e.g., active use time between crashes) before sending to UMA. Abstracting this in a separate class also simplifies the daemon unit tests. An alternative design would store the data on shutdown (but may slow down shutdown a little). This should do it for now. BUG=none TEST=gmerged on device,inspected logs,about:histograms,etc.

Patch Set 1 #

Patch Set 2 : whitespace #

Total comments: 32

Patch Set 3 : Address review comments. Callback mock fix. #

Patch Set 4 : Address kmixter's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+722 lines, -306 lines) Patch
M Makefile View 1 2 2 chunks +17 lines, -7 lines 0 comments Download
A counter.h View 1 2 3 1 chunk +151 lines, -0 lines 0 comments Download
A counter.cc View 1 2 3 1 chunk +176 lines, -0 lines 0 comments Download
A counter_mock.h View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
A counter_test.cc View 1 2 1 chunk +262 lines, -0 lines 0 comments Download
M metrics_daemon.h View 5 chunks +12 lines, -22 lines 0 comments Download
M metrics_daemon.cc View 6 chunks +25 lines, -68 lines 0 comments Download
M metrics_daemon_test.cc View 1 2 9 chunks +52 lines, -208 lines 0 comments Download
M metrics_library_mock.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
petkov
Once this is in, recording active use time between crashes would need to: - Initialize ...
10 years, 6 months ago (2010-06-10 16:08:19 UTC) #1
sosa
Mostly nits http://codereview.chromium.org/2731008/diff/2001/3001 File Makefile (right): http://codereview.chromium.org/2731008/diff/2001/3001#newcode40 Makefile:40: TESTCOUNTER_LIBS = -lgtest -lgtest -lbase -lrt -lpthread ...
10 years, 6 months ago (2010-06-10 20:41:37 UTC) #2
kmixter1
LGTM http://codereview.chromium.org/2731008/diff/2001/3002 File counter.cc (right): http://codereview.chromium.org/2731008/diff/2001/3002#newcode51 counter.cc:51: UpdateInternal(/* tag */ 0, /* count */ 0, ...
10 years, 6 months ago (2010-06-10 21:59:56 UTC) #3
petkov
Thanks for the quick review. Addressed and responded to all comments, I think. Also, fixed ...
10 years, 6 months ago (2010-06-10 22:03:32 UTC) #4
petkov
Thanks again for the quick review. Addressed new comments. http://codereview.chromium.org/2731008/diff/2001/3002 File counter.cc (right): http://codereview.chromium.org/2731008/diff/2001/3002#newcode51 counter.cc:51: ...
10 years, 6 months ago (2010-06-10 22:15:18 UTC) #5
sosa
10 years, 6 months ago (2010-06-10 22:52:17 UTC) #6
lgtm

Powered by Google App Engine
This is Rietveld 408576698