|
|
Created:
4 years, 11 months ago by kcarattini Modified:
4 years, 11 months ago CC:
chromium-reviews, grt+watch_chromium.org, asvitkine+watch_chromium.org, chrome-apps-syd-reviews_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@osb-pm-3 Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAdds UMA histogram metrics for SafeBrowsing PVer4 methods.
BUG=561867
Committed: https://crrev.com/b0746c34eaa9b36fe6b7a20c4fa7fa213a71697e
Cr-Commit-Position: refs/heads/master@{#369350}
Patch Set 1 #
Total comments: 8
Patch Set 2 : Review Comments #Patch Set 3 : Typo #Patch Set 4 : Rebase #
Total comments: 3
Patch Set 5 : Add comment #
Messages
Total messages: 24 (7 generated)
kcarattini@chromium.org changed reviewers: + awoz@google.com, nparker@chromium.org, vakh@google.com
https://codereview.chromium.org/1563763002/diff/1/chrome/browser/safe_browsin... File chrome/browser/safe_browsing/protocol_manager.cc (right): https://codereview.chromium.org/1563763002/diff/1/chrome/browser/safe_browsin... chrome/browser/safe_browsing/protocol_manager.cc:96: "SafeBrowsing.V4HttpResponseOrErrorCode"; Should this have "Hash" in it somewhere? (since there will he other V4Http Responses) https://codereview.chromium.org/1563763002/diff/1/chrome/browser/safe_browsin... chrome/browser/safe_browsing/protocol_manager.cc:496: // Update or chunk response. I always thought it was odd that this OnURLFetchComplete() handles both chunk responses and hash responses, since they are quite different... Do you think there is an advantage to having the v4 hash handling in here as well, rather than in a separate class? If there's no overlap, it could make both simpler by creating a V4ProtocolManager or some such. Just a thought. You could land this stuff and consider pull it out later. Or we could leave it here till all the V3 code goes away (quarters). https://codereview.chromium.org/1563763002/diff/1/tools/metrics/histograms/hi... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1563763002/diff/1/tools/metrics/histograms/hi... tools/metrics/histograms/histograms.xml:40213: + prefix collision). (PARSE_ERROR, NETWORK_ERROR, HTTP_ERROR, and Could remove the mention of past changes, since there is not v4 data back then. Also mention that this is similar to the GetHashResult, but for v4. https://codereview.chromium.org/1563763002/diff/1/tools/metrics/histograms/hi... tools/metrics/histograms/histograms.xml:40283: +<histogram name="SafeBrowsing.V4HttpResponseOrErrorCode" Again I think this should be "Hash" specific.
Thanks for the review! PTAL. https://codereview.chromium.org/1563763002/diff/1/chrome/browser/safe_browsin... File chrome/browser/safe_browsing/protocol_manager.cc (right): https://codereview.chromium.org/1563763002/diff/1/chrome/browser/safe_browsin... chrome/browser/safe_browsing/protocol_manager.cc:96: "SafeBrowsing.V4HttpResponseOrErrorCode"; On 2016/01/07 05:28:29, nparker wrote: > Should this have "Hash" in it somewhere? (since there will he other V4Http > Responses) Done. https://codereview.chromium.org/1563763002/diff/1/chrome/browser/safe_browsin... chrome/browser/safe_browsing/protocol_manager.cc:496: // Update or chunk response. On 2016/01/07 05:28:29, nparker wrote: > I always thought it was odd that this OnURLFetchComplete() handles both chunk > responses and hash responses, since they are quite different... Do you think > there is an advantage to having the v4 hash handling in here as well, rather > than in a separate class? If there's no overlap, it could make both simpler by > creating a V4ProtocolManager or some such. Just a thought. You could land this > stuff and consider pull it out later. Or we could leave it here till all the V3 > code goes away (quarters). Added a TODO to consider pulling this out in the future. There is a small amount of method and type definition reuse that is useful in keeping these together e.g. the ResultType definition). https://codereview.chromium.org/1563763002/diff/1/tools/metrics/histograms/hi... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1563763002/diff/1/tools/metrics/histograms/hi... tools/metrics/histograms/histograms.xml:40213: + prefix collision). (PARSE_ERROR, NETWORK_ERROR, HTTP_ERROR, and On 2016/01/07 05:28:29, nparker wrote: > Could remove the mention of past changes, since there is not v4 data back then. > Also mention that this is similar to the GetHashResult, but for v4. Done. https://codereview.chromium.org/1563763002/diff/1/tools/metrics/histograms/hi... tools/metrics/histograms/histograms.xml:40283: +<histogram name="SafeBrowsing.V4HttpResponseOrErrorCode" On 2016/01/07 05:28:29, nparker wrote: > Again I think this should be "Hash" specific. Done.
lgtm
lgtm
lgtm
kcarattini@chromium.org changed reviewers: + holte@chromium.org
holte@ please review histograms.xml Thanks, Kendra
https://codereview.chromium.org/1563763002/diff/60001/chrome/browser/safe_bro... File chrome/browser/safe_browsing/protocol_manager.cc (right): https://codereview.chromium.org/1563763002/diff/60001/chrome/browser/safe_bro... chrome/browser/safe_browsing/protocol_manager.cc:507: RecordGetV4HashResult(GET_HASH_PARSE_ERROR); It's usually preferable to have non-overlapping enum values, so that you can say if 30% of the counts in a histogram fall in bucket X then 30% of the operations that recorded a result had that result. In this path it looks like you are recording counts in both PARSE_ERROR and STATUS_200, which will make interpreting those results more complicated. It would be cleaner to make these two cases (STATUS_200 w/o error and PARSE_ERROR) Not sure if BACKOFF_ERROR/MIN_WAIT_DURATION_ERROR can also be recorded.
https://codereview.chromium.org/1563763002/diff/60001/chrome/browser/safe_bro... File chrome/browser/safe_browsing/protocol_manager.cc (right): https://codereview.chromium.org/1563763002/diff/60001/chrome/browser/safe_bro... chrome/browser/safe_browsing/protocol_manager.cc:507: RecordGetV4HashResult(GET_HASH_PARSE_ERROR); On 2016/01/13 21:25:43, Steven Holte wrote: > It's usually preferable to have non-overlapping enum values, so that you can say > if 30% of the counts in a histogram fall in bucket X then 30% of the operations > that recorded a result had that result. > > In this path it looks like you are recording counts in both PARSE_ERROR and > STATUS_200, which will make interpreting those results more complicated. It > would be cleaner to make these two cases (STATUS_200 w/o error and PARSE_ERROR) > > Not sure if BACKOFF_ERROR/MIN_WAIT_DURATION_ERROR can also be recorded. Nathan, please correct me if I'm wrong, but I assume we are interested in the raw counts of these histogram buckets rather than percentage, and we only look for large changes in these metrics to indicate something is amiss. Otherwise, as Steve mentioned, interpreting the results is more complicated. I could remove the GET_HASH_PARSE_ERROR bucket entirely because I have added a new histogram for that in a follow up cl anyway, but the other buckets (backoff, min_wait_duration etc.) would still overlap. I've added the new histograms buckets in the same way that the existing v3 GetHashResult metrics are recorded so I am assuming this is the way we want it.
On 2016/01/13 22:53:21, kcarattini wrote: > https://codereview.chromium.org/1563763002/diff/60001/chrome/browser/safe_bro... > File chrome/browser/safe_browsing/protocol_manager.cc (right): > > https://codereview.chromium.org/1563763002/diff/60001/chrome/browser/safe_bro... > chrome/browser/safe_browsing/protocol_manager.cc:507: > RecordGetV4HashResult(GET_HASH_PARSE_ERROR); > On 2016/01/13 21:25:43, Steven Holte wrote: > > It's usually preferable to have non-overlapping enum values, so that you can > say > > if 30% of the counts in a histogram fall in bucket X then 30% of the > operations > > that recorded a result had that result. > > > > In this path it looks like you are recording counts in both PARSE_ERROR and > > STATUS_200, which will make interpreting those results more complicated. It > > would be cleaner to make these two cases (STATUS_200 w/o error and > PARSE_ERROR) > > > > Not sure if BACKOFF_ERROR/MIN_WAIT_DURATION_ERROR can also be recorded. > > Nathan, please correct me if I'm wrong, but I assume we are interested in the > raw counts of these histogram buckets rather than percentage, and we only look > for large changes in these metrics to indicate something is amiss. Otherwise, as > Steve mentioned, interpreting the results is more complicated. I could remove > the GET_HASH_PARSE_ERROR bucket entirely because I have added a new histogram > for that in a follow up cl anyway, but the other buckets (backoff, > min_wait_duration etc.) would still overlap. I've added the new histograms > buckets in the same way that the existing v3 GetHashResult metrics are recorded > so I am assuming this is the way we want it. If you know you don't care about bucket percentages, then lgtm.
https://codereview.chromium.org/1563763002/diff/60001/chrome/browser/safe_bro... File chrome/browser/safe_browsing/protocol_manager.cc (right): https://codereview.chromium.org/1563763002/diff/60001/chrome/browser/safe_bro... chrome/browser/safe_browsing/protocol_manager.cc:507: RecordGetV4HashResult(GET_HASH_PARSE_ERROR); On 2016/01/13 22:53:20, kcarattini wrote: > On 2016/01/13 21:25:43, Steven Holte wrote: > > It's usually preferable to have non-overlapping enum values, so that you can > say > > if 30% of the counts in a histogram fall in bucket X then 30% of the > operations > > that recorded a result had that result. > > > > In this path it looks like you are recording counts in both PARSE_ERROR and > > STATUS_200, which will make interpreting those results more complicated. It > > would be cleaner to make these two cases (STATUS_200 w/o error and > PARSE_ERROR) > > > > Not sure if BACKOFF_ERROR/MIN_WAIT_DURATION_ERROR can also be recorded. > > Nathan, please correct me if I'm wrong, but I assume we are interested in the > raw counts of these histogram buckets rather than percentage, and we only look > for large changes in these metrics to indicate something is amiss. Otherwise, as > Steve mentioned, interpreting the results is more complicated. I could remove > the GET_HASH_PARSE_ERROR bucket entirely because I have added a new histogram > for that in a follow up cl anyway, but the other buckets (backoff, > min_wait_duration etc.) would still overlap. I've added the new histograms > buckets in the same way that the existing v3 GetHashResult metrics are recorded > so I am assuming this is the way we want it. I agree with Steven but if it's already overlapping, there's not real harm in adding more overlapping. As long as this is described in the .xml text, then this is fine.
Thanks, I added a comment. We can always add histograms with mutually exclusive buckets if we want to in the future.
The CQ bit was checked by kcarattini@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from nparker@chromium.org, awoz@google.com, vakh@google.com, holte@chromium.org Link to the patchset: https://codereview.chromium.org/1563763002/#ps80001 (title: "Add comment")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1563763002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1563763002/80001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_TIMED_OUT, no build URL) android_chromium_gn_compile_dbg on tryserver.chromium.android (JOB_TIMED_OUT, no build URL) android_chromium_gn_compile_rel on tryserver.chromium.android (JOB_TIMED_OUT, no build URL) android_clang_dbg_recipe on tryserver.chromium.android (JOB_TIMED_OUT, no build URL) android_compile_dbg on tryserver.chromium.android (JOB_TIMED_OUT, no build URL) cast_shell_android on tryserver.chromium.android (JOB_TIMED_OUT, no build URL)
The CQ bit was checked by kcarattini@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1563763002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1563763002/80001
Message was sent while issue was closed.
Committed patchset #5 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== Adds UMA histogram metrics for SafeBrowsing PVer4 methods. BUG=561867 ========== to ========== Adds UMA histogram metrics for SafeBrowsing PVer4 methods. BUG=561867 Committed: https://crrev.com/b0746c34eaa9b36fe6b7a20c4fa7fa213a71697e Cr-Commit-Position: refs/heads/master@{#369350} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/b0746c34eaa9b36fe6b7a20c4fa7fa213a71697e Cr-Commit-Position: refs/heads/master@{#369350} |