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

Issue 1143323006: Histograms.xml python script housekeeping (Closed)

Created:
5 years, 7 months ago by ncarter (slow)
Modified:
5 years, 6 months ago
Reviewers:
Ilya Sherman, jam
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, asvitkine+watch_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@bad_message
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Histograms.xml python script housekeeping: - Add an autogeneration script for the bad_message.h files. - add histogram_paths.py, to help deal with paths consistently. - Specify filenames relative to src/ in all scripts. This makes things more greppable, and eliminates a problem where the os- specific path separator would seep into the histograms.xml if you ran the scripts on Windows. - Make the scripts run properly from any directory (previously they had to be run from the histograms directory). - Update some docstring comments (google python style) Changes outside of tools\metrics: - From bad_message.h files, mention the autogen script. And finally: - Run all the scripts, which revealed some neglected enum values. TEST=Run tools/metrics/.../*.py on Windows BUG=338781, 485227 Committed: https://crrev.com/0b08cdaeab9210611012014b9ba7ac93d7efb5c7 Cr-Commit-Position: refs/heads/master@{#332724}

Patch Set 1 #

Patch Set 2 : Add comments to bad_message.h's #

Patch Set 3 : Re-upload #

Patch Set 4 : Split off the extensions permission weirdness. #

Total comments: 10

Patch Set 5 : __init__/py's #

Patch Set 6 : Sync, address review comments, fix imports, add __init__.pys #

Patch Set 7 : Small whitespace adjustment #

Total comments: 3

Patch Set 8 : Rebase. #

Patch Set 9 : Re run scripts #

Patch Set 10 : Fix imports (sadface) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+281 lines, -182 lines) Patch
M chrome/browser/bad_message.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M components/nacl/browser/bad_message.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/bad_message.h View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M extensions/browser/bad_message.h View 1 1 chunk +3 lines, -1 line 0 comments Download
A tools/metrics/common/path_util.py View 1 2 3 4 1 chunk +23 lines, -0 lines 0 comments Download
M tools/metrics/common/presubmit_util.py View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M tools/metrics/histograms/find_unmapped_histograms.py View 1 2 3 4 5 6 7 8 9 7 chunks +25 lines, -31 lines 0 comments Download
M tools/metrics/histograms/histogram_ownership.py View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 23 chunks +97 lines, -60 lines 0 comments Download
M tools/metrics/histograms/pretty_print.py View 1 2 3 4 5 6 7 8 9 4 chunks +7 lines, -8 lines 0 comments Download
M tools/metrics/histograms/print_style.py View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
A tools/metrics/histograms/update_bad_message_reasons.py View 1 2 3 4 5 1 chunk +32 lines, -0 lines 0 comments Download
M tools/metrics/histograms/update_editor_commands.py View 1 2 3 4 5 6 7 8 9 4 chunks +11 lines, -14 lines 0 comments Download
M tools/metrics/histograms/update_extension_functions.py View 5 1 chunk +2 lines, -4 lines 0 comments Download
M tools/metrics/histograms/update_extension_permission.py View 1 chunk +4 lines, -8 lines 0 comments Download
M tools/metrics/histograms/update_histogram_enum.py View 1 2 3 4 5 6 7 8 9 5 chunks +21 lines, -12 lines 0 comments Download
M tools/metrics/histograms/update_net_error_codes.py View 1 2 3 4 5 6 7 8 9 3 chunks +14 lines, -11 lines 0 comments Download
M tools/metrics/histograms/update_policies.py View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -7 lines 0 comments Download
M tools/metrics/histograms/update_use_counter_css.py View 1 2 3 4 5 6 7 8 9 3 chunks +8 lines, -8 lines 0 comments Download
M tools/metrics/histograms/update_use_counter_feature_enum.py View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -3 lines 0 comments Download
M tools/metrics/histograms/validate_format.py View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -4 lines 0 comments Download
M tools/metrics/rappor/pretty_print.py View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 30 (9 generated)
ncarter (slow)
Hi isherman, Please review! Note that this CL depends on two unlanded issues: issue 1145013004 ...
5 years, 7 months ago (2015-05-26 23:15:38 UTC) #2
Ilya Sherman
Thanks for the cleanup! https://codereview.chromium.org/1143323006/diff/60001/tools/metrics/histograms/histograms_path.py File tools/metrics/histograms/histograms_path.py (right): https://codereview.chromium.org/1143323006/diff/60001/tools/metrics/histograms/histograms_path.py#newcode1 tools/metrics/histograms/histograms_path.py:1: # Copyright 2013 The Chromium ...
5 years, 7 months ago (2015-05-27 00:12:25 UTC) #3
ncarter (slow)
PTAL. I had to sync (sorry) to make sure histograms.xml was the newest so you ...
5 years, 6 months ago (2015-05-29 23:01:11 UTC) #4
Ilya Sherman
LGTM, thanks. https://codereview.chromium.org/1143323006/diff/120001/tools/metrics/histograms/find_unmapped_histograms.py File tools/metrics/histograms/find_unmapped_histograms.py (right): https://codereview.chromium.org/1143323006/diff/120001/tools/metrics/histograms/find_unmapped_histograms.py#newcode148 tools/metrics/histograms/find_unmapped_histograms.py:148: if not histogram or histogram[0] != '"' ...
5 years, 6 months ago (2015-05-31 00:41:03 UTC) #5
ncarter (slow)
https://codereview.chromium.org/1143323006/diff/120001/tools/metrics/histograms/find_unmapped_histograms.py File tools/metrics/histograms/find_unmapped_histograms.py (right): https://codereview.chromium.org/1143323006/diff/120001/tools/metrics/histograms/find_unmapped_histograms.py#newcode148 tools/metrics/histograms/find_unmapped_histograms.py:148: if not histogram or histogram[0] != '"' or histogram[-1] ...
5 years, 6 months ago (2015-06-01 17:04:13 UTC) #6
chromium-reviews
Can we instead ignore comment lines? On Mon, Jun 1, 2015 at 1:04 PM, <nick@chromium.org> ...
5 years, 6 months ago (2015-06-01 18:45:11 UTC) #7
Ilya Sherman
https://codereview.chromium.org/1143323006/diff/120001/tools/metrics/histograms/find_unmapped_histograms.py File tools/metrics/histograms/find_unmapped_histograms.py (right): https://codereview.chromium.org/1143323006/diff/120001/tools/metrics/histograms/find_unmapped_histograms.py#newcode148 tools/metrics/histograms/find_unmapped_histograms.py:148: if not histogram or histogram[0] != '"' or histogram[-1] ...
5 years, 6 months ago (2015-06-01 20:25:45 UTC) #8
chromium-reviews
I don't feel super strongly. I do prefer to ignore comments if we can, but ...
5 years, 6 months ago (2015-06-01 20:47:11 UTC) #9
ncarter (slow)
On 2015/06/01 20:47:11, chromium-reviews wrote: > I don't feel super strongly. I do prefer to ...
5 years, 6 months ago (2015-06-01 21:36:34 UTC) #10
ncarter (slow)
jam: need approval for the changes outside of tools/metrics
5 years, 6 months ago (2015-06-01 21:37:30 UTC) #12
chromium-reviews
SG, you have Ilya's LGTM so should be good to go, I think. :) On ...
5 years, 6 months ago (2015-06-01 21:38:29 UTC) #13
jam
On 2015/06/01 21:37:30, ncarter wrote: > jam: need approval for the changes outside of tools/metrics ...
5 years, 6 months ago (2015-06-02 17:56:16 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1143323006/120001
5 years, 6 months ago (2015-06-03 17:41:39 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_compile_dbg_ng/builds/57805) linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 6 months ago (2015-06-03 17:49:44 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1143323006/160001
5 years, 6 months ago (2015-06-03 20:16:31 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/68076)
5 years, 6 months ago (2015-06-03 20:28:21 UTC) #23
ncarter (slow)
isherman: please take another look (ps9 vs. ps10); I had to back out the __init__.py ...
5 years, 6 months ago (2015-06-03 21:51:54 UTC) #24
Ilya Sherman
LGTM, thanks.
5 years, 6 months ago (2015-06-03 21:56:26 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1143323006/180001
5 years, 6 months ago (2015-06-03 22:07:14 UTC) #28
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 6 months ago (2015-06-03 23:27:53 UTC) #29
commit-bot: I haz the power
5 years, 6 months ago (2015-06-03 23:28:54 UTC) #30
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/0b08cdaeab9210611012014b9ba7ac93d7efb5c7
Cr-Commit-Position: refs/heads/master@{#332724}

Powered by Google App Engine
This is Rietveld 408576698