|
|
Created:
4 years, 2 months ago by vakh (use Gerrit instead) Modified:
4 years, 2 months ago CC:
chromium-reviews, grt+watch_chromium.org, asvitkine+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAdd UMA metrics for the time it takes to read store from disk and apply update
BUG=651911, 543161
Committed: https://crrev.com/8ccfe9a0fb1404e2d09d39010744a7f58458848d
Cr-Commit-Position: refs/heads/master@{#422968}
Patch Set 1 #
Total comments: 14
Patch Set 2 : Also log per store UMA metrics for time. Detailed explanation of histograms. Other minor changes. #Patch Set 3 : Refactored histogram comments #Patch Set 4 : Use base::StringPrintf to generate the partial histogram name. Thanks Windows! #
Total comments: 4
Patch Set 5 : Reduce the max value and increase the number of buckets in histogram. #
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 50 (33 generated)
The CQ bit was checked by vakh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
vakh@chromium.org changed reviewers: + nparker@chromium.org
vakh@chromium.org changed reviewers: + rkaplow@chromium.org
rkaplow@: Please review the changes in histograms.xml
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2383063003/diff/1/components/safe_browsing_db... File components/safe_browsing_db/v4_store.cc (right): https://codereview.chromium.org/2383063003/diff/1/components/safe_browsing_db... components/safe_browsing_db/v4_store.cc:26: void RecordAddUnlumpedHashesTime(base::TimeDelta time) { style nit: Personally I think it's easier to follow if the UMA metric is placed right in the code. The place where I'd use a function is if it were used more than once, and you want to ensure consistency and type checking. [talked offline about adding store_name to these] So if you're adding store name, then you might want these functions, or even add them to the class so they can access the store_id/name directly. https://codereview.chromium.org/2383063003/diff/1/components/safe_browsing_db... components/safe_browsing_db/v4_store.cc:144: base::TimeTicks before = base::TimeTicks::Now(); I'd add a using base::TimeTicks to simplify all of this. https://codereview.chromium.org/2383063003/diff/1/components/safe_browsing_db... components/safe_browsing_db/v4_store.cc:148: RecordProcessPartialUpdateTime(after - before); nit: You can skip the |afer| and just do TimeTicks::Now() - before. Less verbiage. Here and elsewhere. https://codereview.chromium.org/2383063003/diff/1/components/safe_browsing_db... components/safe_browsing_db/v4_store.cc:351: base::TimeTicks before = base::TimeTicks::Now(); What is this recording? The copying of the string? Does UMA record time with sufficient precision to make this an actionable metric? https://codereview.chromium.org/2383063003/diff/1/tools/metrics/histograms/hi... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2383063003/diff/1/tools/metrics/histograms/hi... tools/metrics/histograms/histograms.xml:50798: + <summary> Can you annotate each of these for cases where one includes another one? It's not obvious from the descriptions https://codereview.chromium.org/2383063003/diff/1/tools/metrics/histograms/hi... tools/metrics/histograms/histograms.xml:50801: + case of reading the store from disk on start-up. "...or it may have just been read from disk." https://codereview.chromium.org/2383063003/diff/1/tools/metrics/histograms/hi... tools/metrics/histograms/histograms.xml:50810: + it takes to convert the update into a hash map that's looked up on resource what is looked up on resource reputation requests? I don't understand that part. Same below.
Also log per store UMA metrics for time. Detailed explanation of histograms. Other minor changes.
The CQ bit was checked by vakh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Refactored histogram comments
The CQ bit was checked by vakh@chromium.org to run a CQ dry run
Thanks, PTAL. https://codereview.chromium.org/2383063003/diff/1/components/safe_browsing_db... File components/safe_browsing_db/v4_store.cc (right): https://codereview.chromium.org/2383063003/diff/1/components/safe_browsing_db... components/safe_browsing_db/v4_store.cc:26: void RecordAddUnlumpedHashesTime(base::TimeDelta time) { On 2016/09/30 22:32:05, Nathan Parker wrote: > style nit: Personally I think it's easier to follow if the UMA metric is placed > right in the code. The place where I'd use a function is if it were used more > than once, and you want to ensure consistency and type checking. > > [talked offline about adding store_name to these] > So if you're adding store name, then you might want these functions, or even add > them to the class so they can access the store_id/name directly. Done. Added the store specific histograms for Time only for now since this CL is adding time related metrics. I'll add the per-store metrics for result enums as a separate CL. https://codereview.chromium.org/2383063003/diff/1/components/safe_browsing_db... components/safe_browsing_db/v4_store.cc:144: base::TimeTicks before = base::TimeTicks::Now(); On 2016/09/30 22:32:05, Nathan Parker wrote: > I'd add a > using base::TimeTicks > to simplify all of this. Done. https://codereview.chromium.org/2383063003/diff/1/components/safe_browsing_db... components/safe_browsing_db/v4_store.cc:148: RecordProcessPartialUpdateTime(after - before); On 2016/09/30 22:32:05, Nathan Parker wrote: > nit: You can skip the |afer| and just do TimeTicks::Now() - before. Less > verbiage. Here and elsewhere. Done. https://codereview.chromium.org/2383063003/diff/1/components/safe_browsing_db... components/safe_browsing_db/v4_store.cc:351: base::TimeTicks before = base::TimeTicks::Now(); On 2016/09/30 22:32:05, Nathan Parker wrote: > What is this recording? The copying of the string? Does UMA record time with > sufficient precision to make this an actionable metric? My goal is to remove the TODO. If UMA shows that this operation doesn't take any considerable amount of time, that would be an argument for removing the TODO. The other concern would be to reuse memory but since this operation happens ~once per list every ~15-30 mins, it is probably not worth optimizing. https://codereview.chromium.org/2383063003/diff/1/tools/metrics/histograms/hi... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2383063003/diff/1/tools/metrics/histograms/hi... tools/metrics/histograms/histograms.xml:50798: + <summary> On 2016/09/30 22:32:05, Nathan Parker wrote: > Can you annotate each of these for cases where one includes another one? It's > not obvious from the descriptions Done. https://codereview.chromium.org/2383063003/diff/1/tools/metrics/histograms/hi... tools/metrics/histograms/histograms.xml:50801: + case of reading the store from disk on start-up. On 2016/09/30 22:32:05, Nathan Parker wrote: > "...or it may have just been read from disk." Done. https://codereview.chromium.org/2383063003/diff/1/tools/metrics/histograms/hi... tools/metrics/histograms/histograms.xml:50810: + it takes to convert the update into a hash map that's looked up on resource On 2016/09/30 22:32:05, Nathan Parker wrote: > what is looked up on resource reputation requests? I don't understand that > part. Same below. Done. PLMK if the new description is also not clear.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
Use StringType otherwise Windows builds fail
The CQ bit was checked by vakh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
Use StringType with FILE_PATH_LITERAL
The CQ bit was checked by vakh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Use StringType with FILE_PATH_LITERAL
The CQ bit was checked by vakh@chromium.org to run a CQ dry run
Patchset #5 (id:80001) has been deleted
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
Use base::StringPrintf to generate the partial histogram name. Thanks Windows!
The CQ bit was checked by vakh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #4 (id:60001) has been deleted
Patchset #4 (id:100001) has been deleted
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
lgtm https://codereview.chromium.org/2383063003/diff/120001/components/safe_browsi... File components/safe_browsing_db/v4_store.cc (right): https://codereview.chromium.org/2383063003/diff/120001/components/safe_browsi... components/safe_browsing_db/v4_store.cc:31: ".%" PRIsFP, file_path.BaseName().RemoveExtension().value().c_str()); [no action required] Is this just a way to convert to UTF8? I think we're assuming the filename is ASCII anyway. You might be able to use MaybeAsASCII(). https://codereview.chromium.org/2383063003/diff/120001/components/safe_browsi... components/safe_browsing_db/v4_store.cc:44: base::TimeDelta::FromHours(1), 50, What bucket values does this produce? I'm guessing we don't care about precision above, say 30 seconds. Might as well use that precision down lower in the few ms range.
https://codereview.chromium.org/2383063003/diff/120001/components/safe_browsi... File components/safe_browsing_db/v4_store.cc (right): https://codereview.chromium.org/2383063003/diff/120001/components/safe_browsi... components/safe_browsing_db/v4_store.cc:31: ".%" PRIsFP, file_path.BaseName().RemoveExtension().value().c_str()); On 2016/10/04 20:30:43, Nathan Parker wrote: > [no action required] Is this just a way to convert to UTF8? I think we're > assuming the filename is ASCII anyway. You might be able to use MaybeAsASCII(). The file is always ASCII since we chose the name for it. The current implementation is consistent with the DebugString so it might be good to keep it as is. https://codereview.chromium.org/2383063003/diff/120001/components/safe_browsi... components/safe_browsing_db/v4_store.cc:44: base::TimeDelta::FromHours(1), 50, On 2016/10/04 20:30:44, Nathan Parker wrote: > What bucket values does this produce? I'm guessing we don't care about precision > above, say 30 seconds. Might as well use that precision down lower in the few > ms range. The bucket count is 50. It's the same as UMA_HISTOGRAM_LONG_TIMES. I could change the bucket count to 100 and reduce the maximum to 1 minute (just to be safe). WDYT?
Reduce the max value and increase the number of buckets in histogram.
The CQ bit was checked by vakh@chromium.org to run a CQ dry run
The CQ bit was checked by vakh@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from nparker@chromium.org, rkaplow@chromium.org Link to the patchset: https://codereview.chromium.org/2383063003/#ps140001 (title: "Reduce the max value and increase the number of buckets in histogram.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #5 (id:140001)
Message was sent while issue was closed.
Description was changed from ========== Add UMA metrics for the time it takes to read store from disk and apply update BUG=651911, 543161 ========== to ========== Add UMA metrics for the time it takes to read store from disk and apply update BUG=651911, 543161 Committed: https://crrev.com/8ccfe9a0fb1404e2d09d39010744a7f58458848d Cr-Commit-Position: refs/heads/master@{#422968} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/8ccfe9a0fb1404e2d09d39010744a7f58458848d Cr-Commit-Position: refs/heads/master@{#422968} |