Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Issue 2920223002: Add additional histograms with suffixes to ImportantFileWriter. (Closed)

Created:
3 years, 6 months ago by xaerox
Modified:
3 years, 6 months ago
CC:
chromium-reviews, tfarina, danakj+watch_chromium.org, asvitkine+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add additional histograms with suffixes to ImportantFileWriter. Additional histograms are added to the ImportantFileWriter code to monitor system error codes, and find out exact reasons for failures. Furthermore, histogram suffixes are introduced to discriminate users of the ImportantFileWriter code. As an example, two services (BookmarkStorage and FeedbackReport) are now using the suffixes, which can be further utilized in other services. The original ImportantFile.TempFileFailures histogram will also be dynamically suffixed. [email protected] TEST=New histograms and suffixes will appear. BUG= Review-Url: https://codereview.chromium.org/2920223002 Cr-Commit-Position: refs/heads/master@{#480783} Committed: https://chromium.googlesource.com/chromium/src/+/4ae8d1757f7b5a0cb85497205a80ed2a572a5165

Patch Set 1 #

Total comments: 7

Patch Set 2 : Fix problems pointed by code reviewers. #

Total comments: 4

Patch Set 3 : Fix more problems pointed by code reviewers. #

Total comments: 6

Patch Set 4 : Fix histogram suffix to use string reference instead of StringPiece. #

Total comments: 4

Patch Set 5 : Revert histogram suffix to use StringPiece instead of string reference. #

Total comments: 2

Patch Set 6 : Minor fix of std::string::append. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -27 lines) Patch
M base/files/important_file_writer.h View 1 2 3 4 3 chunks +10 lines, -3 lines 0 comments Download
M base/files/important_file_writer.cc View 1 2 3 4 5 7 chunks +89 lines, -20 lines 0 comments Download
M base/files/important_file_writer_unittest.cc View 1 2 chunks +22 lines, -0 lines 0 comments Download
M components/bookmarks/browser/bookmark_storage.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M components/feedback/feedback_report.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 2 chunks +47 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (27 generated)
xaerox
3 years, 6 months ago (2017-06-05 09:58:19 UTC) #1
xaerox
3 years, 6 months ago (2017-06-05 10:11:09 UTC) #8
sky
+dcheng for base changes https://codereview.chromium.org/2920223002/diff/1/base/files/important_file_writer.h File base/files/important_file_writer.h (right): https://codereview.chromium.org/2920223002/diff/1/base/files/important_file_writer.h#newcode58 base/files/important_file_writer.h:58: std::string histogram_suffix = std::string()); const ...
3 years, 6 months ago (2017-06-05 16:50:33 UTC) #10
rkaplow
https://codereview.chromium.org/2920223002/diff/1/base/files/important_file_writer.cc File base/files/important_file_writer.cc (right): https://codereview.chromium.org/2920223002/diff/1/base/files/important_file_writer.cc#newcode58 base/files/important_file_writer.cc:58: DynamicUmaHistogramEnumeration(const char* histogram_name, can you use the function version ...
3 years, 6 months ago (2017-06-05 18:17:30 UTC) #11
dcheng
https://codereview.chromium.org/2920223002/diff/1/base/files/important_file_writer.h File base/files/important_file_writer.h (right): https://codereview.chromium.org/2920223002/diff/1/base/files/important_file_writer.h#newcode58 base/files/important_file_writer.h:58: std::string histogram_suffix = std::string()); On 2017/06/05 16:50:33, sky wrote: ...
3 years, 6 months ago (2017-06-05 18:23:59 UTC) #12
xaerox
Thank you for the valuable comments. Did my best to improve the code. https://codereview.chromium.org/2920223002/diff/1/base/files/important_file_writer.cc File ...
3 years, 6 months ago (2017-06-07 09:32:55 UTC) #13
dcheng
My personal opinion is that this is a lot of complexity, and I'm not sure ...
3 years, 6 months ago (2017-06-07 22:56:39 UTC) #14
xaerox
Thank you for the comments and remarks! Agree that template magic is probably not the ...
3 years, 6 months ago (2017-06-08 05:52:53 UTC) #15
rkaplow
lgtm
3 years, 6 months ago (2017-06-08 14:57:57 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2920223002/40001
3 years, 6 months ago (2017-06-09 06:38:52 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/459911)
3 years, 6 months ago (2017-06-09 06:45:05 UTC) #28
xaerox
3 years, 6 months ago (2017-06-13 05:54:22 UTC) #30
xaerox
ptal dcheng, please review the changles in important_file_writer. blundell, please check bookmark_storage.cc and give owner's ...
3 years, 6 months ago (2017-06-13 05:54:38 UTC) #31
blundell
//components/bookmarks lgtm
3 years, 6 months ago (2017-06-13 14:24:35 UTC) #32
afakhry
feedback_report.cc lgtm
3 years, 6 months ago (2017-06-13 16:22:02 UTC) #33
dcheng
Just small nits around the use of StringPiece. I don't feel strongly about the arguments ...
3 years, 6 months ago (2017-06-14 19:56:14 UTC) #34
xaerox
dcheng, Thanks for valuable suggestions and comments! Ptal. https://codereview.chromium.org/2920223002/diff/40001/base/files/important_file_writer.cc File base/files/important_file_writer.cc (right): https://codereview.chromium.org/2920223002/diff/40001/base/files/important_file_writer.cc#newcode58 base/files/important_file_writer.cc:58: const ...
3 years, 6 months ago (2017-06-19 06:39:41 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2920223002/60001
3 years, 6 months ago (2017-06-19 06:40:27 UTC) #38
dcheng
https://codereview.chromium.org/2920223002/diff/60001/base/files/important_file_writer.cc File base/files/important_file_writer.cc (right): https://codereview.chromium.org/2920223002/diff/60001/base/files/important_file_writer.cc#newcode126 base/files/important_file_writer.cc:126: const std::string& histogram_suffix) { Since this will change to ...
3 years, 6 months ago (2017-06-19 20:27:56 UTC) #42
xaerox
dcheng, thanks for additional suggestions! Reverted the code to use StringPiece. Furthermore, added a couple ...
3 years, 6 months ago (2017-06-20 04:21:00 UTC) #43
dcheng
LGTM with a nit. Thanks! https://codereview.chromium.org/2920223002/diff/80001/base/files/important_file_writer.cc File base/files/important_file_writer.cc (right): https://codereview.chromium.org/2920223002/diff/80001/base/files/important_file_writer.cc#newcode66 base/files/important_file_writer.cc:66: histogram_full_name.append(1, '.'); I suspect ...
3 years, 6 months ago (2017-06-20 08:25:35 UTC) #44
xaerox
Fixed the nit, thanks! https://codereview.chromium.org/2920223002/diff/80001/base/files/important_file_writer.cc File base/files/important_file_writer.cc (right): https://codereview.chromium.org/2920223002/diff/80001/base/files/important_file_writer.cc#newcode66 base/files/important_file_writer.cc:66: histogram_full_name.append(1, '.'); On 2017/06/20 08:25:34, ...
3 years, 6 months ago (2017-06-20 08:56:08 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2920223002/100001
3 years, 6 months ago (2017-06-20 08:56:49 UTC) #48
commit-bot: I haz the power
3 years, 6 months ago (2017-06-20 10:20:34 UTC) #51
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/4ae8d1757f7b5a0cb85497205a80...

Powered by Google App Engine
This is Rietveld 408576698