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

Issue 2938263002: Put BrowserMetrics with embedded profiles into subdir for auto-upload. (Closed)

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

Description

Put BrowserMetrics with embedded profiles into subdir for auto-upload. Because the BrowserMetrics file now has an embedded profile, it isn't sent as part of the startup sequence but a minute or so after. That means the browser could exit and not send anything with the "previous run" metrics file being overwritten at the next startup. Instead, append a date-stamp to the last-run filename and move it to a subdirectory from which files will be removed only after they are uploaded. BUG=695880 Review-Url: https://codereview.chromium.org/2938263002 Cr-Commit-Position: refs/heads/master@{#484116} Committed: https://chromium.googlesource.com/chromium/src/+/38d8bb9328a2d0a1b7d8373ddd70971c1ce4eeb6

Patch Set 1 #

Patch Set 2 : fix build problems on other architectures #

Patch Set 3 : use file names instead of modified stamp to check if already done #

Patch Set 4 : use BrowserMetrics name as directory name so timestamps will always advance #

Patch Set 5 : better handling of incorrect files #

Patch Set 6 : fixed build problems on other architectures #

Patch Set 7 : rebased #

Total comments: 11

Patch Set 8 : addressed review comments by asvitkine #

Total comments: 4

Patch Set 9 : use std::string::append() where possible #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -28 lines) Patch
M base/metrics/persistent_histogram_allocator.h View 1 2 3 4 5 6 7 2 chunks +13 lines, -0 lines 0 comments Download
M base/metrics/persistent_histogram_allocator.cc View 1 2 3 4 5 6 7 8 3 chunks +39 lines, -7 lines 0 comments Download
M chrome/browser/chrome_browser_field_trials.cc View 1 2 3 4 5 6 7 1 chunk +32 lines, -6 lines 0 comments Download
M chrome/browser/metrics/chrome_metrics_service_client.cc View 1 2 3 4 5 6 4 chunks +20 lines, -13 lines 0 comments Download
M components/metrics/file_metrics_provider.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M components/metrics/file_metrics_provider.cc View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M components/metrics/file_metrics_provider_unittest.cc View 1 2 3 4 5 6 7 1 chunk +54 lines, -0 lines 0 comments Download

Messages

Total messages: 67 (58 generated)
bcwhite
3 years, 6 months ago (2017-06-20 20:42:00 UTC) #43
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/2938263002/diff/200001/base/metrics/persistent_histogram_allocator.cc File base/metrics/persistent_histogram_allocator.cc (right): https://codereview.chromium.org/2938263002/diff/200001/base/metrics/persistent_histogram_allocator.cc#newcode853 base/metrics/persistent_histogram_allocator.cc:853: .AddExtension(PersistentMemoryAllocator::kFileExtension); Nit: Given this pattern is used a ...
3 years, 5 months ago (2017-06-28 17:30:36 UTC) #50
bcwhite
https://codereview.chromium.org/2938263002/diff/200001/base/metrics/persistent_histogram_allocator.cc File base/metrics/persistent_histogram_allocator.cc (right): https://codereview.chromium.org/2938263002/diff/200001/base/metrics/persistent_histogram_allocator.cc#newcode853 base/metrics/persistent_histogram_allocator.cc:853: .AddExtension(PersistentMemoryAllocator::kFileExtension); On 2017/06/28 17:30:35, Alexei Svitkine (slow) wrote: > ...
3 years, 5 months ago (2017-06-28 18:52:08 UTC) #53
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/2938263002/diff/200001/base/metrics/persistent_histogram_allocator.h File base/metrics/persistent_histogram_allocator.h (right): https://codereview.chromium.org/2938263002/diff/200001/base/metrics/persistent_histogram_allocator.h#newcode443 base/metrics/persistent_histogram_allocator.h:443: const std::string& name, On 2017/06/28 18:52:08, bcwhite wrote: ...
3 years, 5 months ago (2017-06-28 19:19:09 UTC) #54
bcwhite
https://codereview.chromium.org/2938263002/diff/220001/base/metrics/persistent_histogram_allocator.cc File base/metrics/persistent_histogram_allocator.cc (right): https://codereview.chromium.org/2938263002/diff/220001/base/metrics/persistent_histogram_allocator.cc#newcode854 base/metrics/persistent_histogram_allocator.cc:854: MakeMetricsFilePath(active_dir, name + std::string("-active")); On 2017/06/28 19:19:09, Alexei Svitkine ...
3 years, 5 months ago (2017-06-28 19:29:51 UTC) #55
Alexei Svitkine (slow)
https://codereview.chromium.org/2938263002/diff/220001/base/metrics/persistent_histogram_allocator.cc File base/metrics/persistent_histogram_allocator.cc (right): https://codereview.chromium.org/2938263002/diff/220001/base/metrics/persistent_histogram_allocator.cc#newcode854 base/metrics/persistent_histogram_allocator.cc:854: MakeMetricsFilePath(active_dir, name + std::string("-active")); On 2017/06/28 19:29:51, bcwhite wrote: ...
3 years, 5 months ago (2017-06-28 19:33:00 UTC) #56
bcwhite
https://codereview.chromium.org/2938263002/diff/220001/base/metrics/persistent_histogram_allocator.cc File base/metrics/persistent_histogram_allocator.cc (right): https://codereview.chromium.org/2938263002/diff/220001/base/metrics/persistent_histogram_allocator.cc#newcode854 base/metrics/persistent_histogram_allocator.cc:854: MakeMetricsFilePath(active_dir, name + std::string("-active")); On 2017/06/28 19:33:00, Alexei Svitkine ...
3 years, 5 months ago (2017-06-28 19:46:16 UTC) #59
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/2938263002/240001
3 years, 5 months ago (2017-07-04 14:36:02 UTC) #64
commit-bot: I haz the power
3 years, 5 months ago (2017-07-04 15:48:23 UTC) #67
Message was sent while issue was closed.
Committed patchset #9 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/38d8bb9328a2d0a1b7d8373ddd70...

Powered by Google App Engine
This is Rietveld 408576698