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

Issue 2810733005: Hint about where to insert integer histogram enum values. (Closed)

Created:
3 years, 8 months ago by DmitrySkiba
Modified:
3 years, 8 months ago
Reviewers:
Ilya Sherman
CC:
chromium-reviews, asvitkine+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Hint about where to insert integer histogram enum values. Some enums in histograms.xml are very long (e.g. LoginCustomFlags), and inserting new values require manually finding the right spot. This CL automates that by logging details of the existing value that comes right before the new value. Review-Url: https://codereview.chromium.org/2810733005 Cr-Commit-Position: refs/heads/master@{#464770} Committed: https://chromium.googlesource.com/chromium/src/+/c8152899d3cd6c3f92446bf75bc63ce606a82bde

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -7 lines) Patch
M tools/metrics/histograms/extract_histograms.py View 1 4 chunks +21 lines, -6 lines 1 comment Download
M tools/metrics/histograms/histograms.xml View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 13 (4 generated)
DmitrySkiba
Example of the output: ERROR:root:Enum LoginCustomFlags int values 2141463681 and 1176621939 are not in numerical ...
3 years, 8 months ago (2017-04-11 17:41:53 UTC) #2
Ilya Sherman
Thanks for the cleanup! https://codereview.chromium.org/2810733005/diff/1/tools/metrics/histograms/extract_histograms.py File tools/metrics/histograms/extract_histograms.py (right): https://codereview.chromium.org/2810733005/diff/1/tools/metrics/histograms/extract_histograms.py#newcode227 tools/metrics/histograms/extract_histograms.py:227: return lo Rather than copying ...
3 years, 8 months ago (2017-04-11 21:34:25 UTC) #3
DmitrySkiba
https://codereview.chromium.org/2810733005/diff/1/tools/metrics/histograms/extract_histograms.py File tools/metrics/histograms/extract_histograms.py (right): https://codereview.chromium.org/2810733005/diff/1/tools/metrics/histograms/extract_histograms.py#newcode227 tools/metrics/histograms/extract_histograms.py:227: return lo On 2017/04/11 21:34:25, Ilya Sherman wrote: > ...
3 years, 8 months ago (2017-04-12 16:24:13 UTC) #4
Ilya Sherman
LGTM, thanks! https://codereview.chromium.org/2810733005/diff/20001/tools/metrics/histograms/extract_histograms.py File tools/metrics/histograms/extract_histograms.py (right): https://codereview.chromium.org/2810733005/diff/20001/tools/metrics/histograms/extract_histograms.py#newcode220 tools/metrics/histograms/extract_histograms.py:220: enum_int_values = list(i[0] for i in enum_items) ...
3 years, 8 months ago (2017-04-12 20:29:33 UTC) #5
DmitrySkiba
On 2017/04/12 20:29:33, Ilya Sherman wrote: > LGTM, thanks! > > https://codereview.chromium.org/2810733005/diff/20001/tools/metrics/histograms/extract_histograms.py > File tools/metrics/histograms/extract_histograms.py ...
3 years, 8 months ago (2017-04-14 18:04:22 UTC) #6
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/2810733005/20001
3 years, 8 months ago (2017-04-14 18:04:48 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/c8152899d3cd6c3f92446bf75bc63ce606a82bde
3 years, 8 months ago (2017-04-14 19:08:57 UTC) #11
Ilya Sherman
On 2017/04/14 18:04:22, DmitrySkiba wrote: > On 2017/04/12 20:29:33, Ilya Sherman wrote: > > LGTM, ...
3 years, 8 months ago (2017-04-14 21:28:03 UTC) #12
DmitrySkiba
3 years, 8 months ago (2017-04-14 21:36:02 UTC) #13
Message was sent while issue was closed.
On 2017/04/14 21:28:03, Ilya Sherman wrote:
> On 2017/04/14 18:04:22, DmitrySkiba wrote:
> > On 2017/04/12 20:29:33, Ilya Sherman wrote:
> > > LGTM, thanks!
> > > 
> > >
> >
>
https://codereview.chromium.org/2810733005/diff/20001/tools/metrics/histogram...
> > > File tools/metrics/histograms/extract_histograms.py (right):
> > > 
> > >
> >
>
https://codereview.chromium.org/2810733005/diff/20001/tools/metrics/histogram...
> > > tools/metrics/histograms/extract_histograms.py:220: enum_int_values =
> > list(i[0]
> > > for i in enum_items)
> > > Optional: I was thinking you could write something like
> > > 
> > > enum_int_values = sorted(enum_dict['values'].keys())
> > > 
> > > and then write line 233 as something like
> > > 
> > > left_int_value = enum_int_values[left_item_index - 1]
> > > left_label = enum_dict['values'][left_int_value]
> > 
> > Yup, you are right, this is better. However, I don't have time for one more
> > iteration, so I'll commit it as is.
> 
> You didn't have time to tweak these lines prior to submitting the code?  I'm
not
> sure what that means.  I intended the LGTM to be sticky, so you would simply
> have needed to make the changes in your local editor, upload a new patch set,
> and then check the CQ box.

Yes, but I literally didn't have time for that yesterday / today. Since you
marked your suggestion as "Optional", and since it's not a critical thing, I
decided to just submit CL as is and free one memory slot in my brain for other
things.

> Anyway, thank you for the addition.  I sent you a small follow-up CL to
address
> these comments, since we both agree that the code is a bit cleaner this way:
> https://codereview.chromium.org/2822783002

Thanks!

Powered by Google App Engine
This is Rietveld 408576698