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

Issue 714273004: mac: Expose keychain access frequency to Telemetry. (Closed)

Created:
6 years, 1 month ago by erikchen
Modified:
5 years, 11 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, telemetry+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@mock_keychain_sleep
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mac: Expose keychain access frequency to Telemetry. Accessing the keychain is really slow. Telemetry tests use a mock keychain, which is abnormally fast. This CL exposes the number of times the mock keychain is accessed via a local histogram, and 4 telemetry measurements record that number as a metric. Those tests are: - speedometer - page_cycler - startup - tab_switching Once this metric is collected, alerts will be added to the Telemetry dashboard to help catch regressions to the number of times the keychain gets accessed. BUG= Committed: https://crrev.com/95dc1d73331ddd636c4abb6bf4b9d5e665fd5449 Cr-Commit-Position: refs/heads/master@{#311744}

Patch Set 1 #

Patch Set 2 : Add a common subclass to measurements. #

Total comments: 12

Patch Set 3 : Remove dependency on another CL. Respond to comments from jeremy. #

Patch Set 4 : Respond to offline comments from tonyg. #

Total comments: 11

Patch Set 5 : Comments from dtu & tonyg. #

Patch Set 6 : Rebase against top of tree. #

Patch Set 7 : Import ordering. #

Patch Set 8 : Comments from dtu. #

Total comments: 18

Patch Set 9 : Comments from jeremy. #

Total comments: 1

Patch Set 10 : Comments from jeremy. #

Patch Set 11 : Minor updates to base/mac/keychain_metrics.h. #

Total comments: 2

Patch Set 12 : Comments from thestig. #

Patch Set 13 : Comments from jeremy - remove duplicate method. #

Patch Set 14 : Rebase against top of tree. #

Patch Set 15 : Move GetEncryptionPassword so that it gets compiled on iOS. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -6 lines) Patch
M components/os_crypt/os_crypt_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -1 line 0 comments Download
M crypto/mock_apple_keychain.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M crypto/mock_apple_keychain.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +23 lines, -0 lines 0 comments Download
M tools/perf/benchmarks/speedometer.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +5 lines, -0 lines 0 comments Download
M tools/perf/measurements/page_cycler.py View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -0 lines 0 comments Download
M tools/perf/measurements/page_cycler_unittest.py View 1 2 3 4 5 6 7 8 3 chunks +21 lines, -3 lines 0 comments Download
M tools/perf/measurements/session_restore.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -2 lines 0 comments Download
M tools/perf/measurements/startup.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download
M tools/perf/measurements/tab_switching.py View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -0 lines 0 comments Download
A tools/perf/metrics/keychain_metric.py View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +40 lines, -0 lines 0 comments Download

Messages

Total messages: 61 (20 generated)
erikchen
jeremy: Please review.
6 years, 1 month ago (2014-11-12 02:14:01 UTC) #5
jeremy
https://codereview.chromium.org/714273004/diff/80001/base/perf_util.cc File base/perf_util.cc (right): https://codereview.chromium.org/714273004/diff/80001/base/perf_util.cc#newcode19 base/perf_util.cc:19: } Shouldn't be part of this CL. https://codereview.chromium.org/714273004/diff/80001/base/perf_util.cc#newcode22 base/perf_util.cc:22: ...
6 years, 1 month ago (2014-11-13 11:31:30 UTC) #6
erikchen
https://codereview.chromium.org/714273004/diff/80001/tools/perf/measurements/__init__.py File tools/perf/measurements/__init__.py (right): https://codereview.chromium.org/714273004/diff/80001/tools/perf/measurements/__init__.py#newcode10 tools/perf/measurements/__init__.py:10: class PageTestMeasurement(page_test.PageTest): On 2014/11/13 11:31:30, jeremy wrote: > I'd ...
6 years, 1 month ago (2014-11-13 18:11:09 UTC) #7
jeremy
On 2014/11/13 18:11:09, erikchen wrote: > I'm not sure that I understand your comment. I ...
6 years, 1 month ago (2014-11-13 18:30:48 UTC) #8
erikchen
On 2014/11/13 18:30:48, jeremy wrote: > On 2014/11/13 18:11:09, erikchen wrote: > > I'm not ...
6 years, 1 month ago (2014-11-13 18:42:24 UTC) #9
jeremy
On 2014/11/13 18:42:24, erikchen wrote: > The two regressions we have found so far have ...
6 years, 1 month ago (2014-11-13 18:55:18 UTC) #10
erikchen
https://codereview.chromium.org/714273004/diff/80001/base/perf_util.cc File base/perf_util.cc (right): https://codereview.chromium.org/714273004/diff/80001/base/perf_util.cc#newcode19 base/perf_util.cc:19: } On 2014/11/13 11:31:29, jeremy wrote: > Shouldn't be ...
6 years, 1 month ago (2014-11-13 22:52:59 UTC) #13
erikchen
dtu: Please review. Also, please confirm that this is the implementation you expected.
6 years, 1 month ago (2014-11-13 22:54:05 UTC) #15
jeremy
I chatted with dtu briefly about this, from what I understand he says we shouldn't ...
6 years, 1 month ago (2014-11-14 18:57:15 UTC) #16
erikchen
On 2014/11/14 18:57:15, jeremy wrote: > I chatted with dtu briefly about this, from what ...
6 years, 1 month ago (2014-11-14 18:59:41 UTC) #17
erikchen
dtu: ping?
6 years, 1 month ago (2014-11-18 18:59:26 UTC) #18
erikchen
dtu: Please review.
6 years ago (2014-11-25 22:56:16 UTC) #22
erikchen
dtu: Ping?
6 years ago (2014-12-02 02:30:31 UTC) #23
dtu
You might need an OWNER for the C++ code too. https://codereview.chromium.org/714273004/diff/220001/tools/perf/measurements/page_cycler_unittest.py File tools/perf/measurements/page_cycler_unittest.py (right): https://codereview.chromium.org/714273004/diff/220001/tools/perf/measurements/page_cycler_unittest.py#newcode106 ...
6 years ago (2014-12-05 01:12:54 UTC) #25
tonyg
https://codereview.chromium.org/714273004/diff/220001/tools/perf/metrics/keychain_metric.py File tools/perf/metrics/keychain_metric.py (right): https://codereview.chromium.org/714273004/diff/220001/tools/perf/metrics/keychain_metric.py#newcode50 tools/perf/metrics/keychain_metric.py:50: if access_count > KeychainMetric.MAX_KEYCHAIN_ACCESS_COUNT: Correct me if I'm mistaken, ...
6 years ago (2014-12-05 03:12:04 UTC) #26
erikchen
Ah, you're right. I misinterpreted the notes from our discussion. Reproducing them here for convenience: ...
6 years ago (2014-12-05 03:28:55 UTC) #27
erikchen
dtu: PTAL https://codereview.chromium.org/714273004/diff/220001/tools/perf/measurements/page_cycler_unittest.py File tools/perf/measurements/page_cycler_unittest.py (right): https://codereview.chromium.org/714273004/diff/220001/tools/perf/measurements/page_cycler_unittest.py#newcode106 tools/perf/measurements/page_cycler_unittest.py:106: cycler.SetInUnitTest(True) On 2014/12/05 01:12:54, dtu wrote: > ...
6 years ago (2014-12-08 23:41:25 UTC) #28
dtu
https://codereview.chromium.org/714273004/diff/220001/tools/perf/measurements/page_cycler_unittest.py File tools/perf/measurements/page_cycler_unittest.py (right): https://codereview.chromium.org/714273004/diff/220001/tools/perf/measurements/page_cycler_unittest.py#newcode106 tools/perf/measurements/page_cycler_unittest.py:106: cycler.SetInUnitTest(True) On 2014/12/08 23:41:25, erikchen wrote: > On 2014/12/05 ...
6 years ago (2014-12-09 00:25:03 UTC) #29
erikchen
dtu: PTAL https://codereview.chromium.org/714273004/diff/220001/tools/perf/measurements/page_cycler_unittest.py File tools/perf/measurements/page_cycler_unittest.py (right): https://codereview.chromium.org/714273004/diff/220001/tools/perf/measurements/page_cycler_unittest.py#newcode106 tools/perf/measurements/page_cycler_unittest.py:106: cycler.SetInUnitTest(True) On 2014/12/09 00:25:03, dtu wrote: > ...
6 years ago (2014-12-09 01:26:03 UTC) #30
jeremy
Can you update the CL description please https://codereview.chromium.org/714273004/diff/300001/base/perf_util.h File base/perf_util.h (right): https://codereview.chromium.org/714273004/diff/300001/base/perf_util.h#newcode1 base/perf_util.h:1: // Copyright ...
6 years ago (2014-12-09 14:57:17 UTC) #31
dtu
lgtm barring jeremy's comments https://codereview.chromium.org/714273004/diff/300001/tools/perf/metrics/keychain_metric.py File tools/perf/metrics/keychain_metric.py (right): https://codereview.chromium.org/714273004/diff/300001/tools/perf/metrics/keychain_metric.py#newcode22 tools/perf/metrics/keychain_metric.py:22: def CustomizeBrowserOptionsMac(cls, options): On 2014/12/09 ...
6 years ago (2014-12-09 22:05:20 UTC) #32
jeremy
https://codereview.chromium.org/714273004/diff/300001/tools/perf/metrics/keychain_metric.py File tools/perf/metrics/keychain_metric.py (right): https://codereview.chromium.org/714273004/diff/300001/tools/perf/metrics/keychain_metric.py#newcode28 tools/perf/metrics/keychain_metric.py:28: options.AppendExtraBrowserArgs(['--enable-stats-collection-bindings']) Good to know, please ignore my comment then ...
6 years ago (2014-12-10 05:35:19 UTC) #33
erikchen
jeremy: PTAL https://codereview.chromium.org/714273004/diff/300001/base/perf_util.h File base/perf_util.h (right): https://codereview.chromium.org/714273004/diff/300001/base/perf_util.h#newcode1 base/perf_util.h:1: // Copyright 2014 The Chromium Authors. All ...
6 years ago (2014-12-13 02:39:59 UTC) #35
jeremy
lgtm https://codereview.chromium.org/714273004/diff/340001/tools/perf/metrics/keychain_metric.py File tools/perf/metrics/keychain_metric.py (right): https://codereview.chromium.org/714273004/diff/340001/tools/perf/metrics/keychain_metric.py#newcode30 tools/perf/metrics/keychain_metric.py:30: def AddResultsMac(self, tab, results): I feel quite strongly ...
6 years ago (2014-12-14 08:55:50 UTC) #36
erikchen
On 2014/12/14 08:55:50, jeremy wrote: > lgtm > > https://codereview.chromium.org/714273004/diff/340001/tools/perf/metrics/keychain_metric.py > File tools/perf/metrics/keychain_metric.py (right): > ...
6 years ago (2014-12-15 19:22:14 UTC) #37
erikchen
thestig: Looking for an OWNER review of components/os_crypt/ and base/. davidben: Looking for an OWNER ...
6 years ago (2014-12-15 21:43:53 UTC) #39
Lei Zhang
https://codereview.chromium.org/714273004/diff/380001/base/mac/keychain_metrics.h File base/mac/keychain_metrics.h (right): https://codereview.chromium.org/714273004/diff/380001/base/mac/keychain_metrics.h#newcode18 base/mac/keychain_metrics.h:18: BASE_EXPORT void IncrementKeychainAccessHistogram(); How about moving this to crypto/apple_keychain.h ...
6 years ago (2014-12-15 22:27:02 UTC) #40
erikchen
thestig: PTAL https://codereview.chromium.org/714273004/diff/380001/base/mac/keychain_metrics.h File base/mac/keychain_metrics.h (right): https://codereview.chromium.org/714273004/diff/380001/base/mac/keychain_metrics.h#newcode18 base/mac/keychain_metrics.h:18: BASE_EXPORT void IncrementKeychainAccessHistogram(); On 2014/12/15 22:27:02, Lei ...
6 years ago (2014-12-15 23:16:11 UTC) #41
Lei Zhang
lgtm
6 years ago (2014-12-15 23:22:36 UTC) #42
jeremy
Rietveld is down but just wanted to point out that AddResults is defined twice in ...
6 years ago (2014-12-17 09:13:55 UTC) #43
erikchen
thanks, fixed in patch set 13.
6 years ago (2014-12-17 21:16:27 UTC) #44
erikchen
agl: Looking for an OWNER review of crypto/ -davidben, as he's OOO
6 years ago (2014-12-17 21:18:46 UTC) #46
erikchen
-agl On the premise that he appears too busy to review this CL. +davidben now ...
5 years, 11 months ago (2015-01-09 23:23:05 UTC) #48
davidben
crypto lgtm. Sorry about the holiday coordination delays.
5 years, 11 months ago (2015-01-12 16:29:37 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/714273004/420001
5 years, 11 months ago (2015-01-12 18:54:59 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_dbg/builds/32061) android_clang_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/36796) linux_chromium_asan_rel ...
5 years, 11 months ago (2015-01-12 18:59:55 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/714273004/440001
5 years, 11 months ago (2015-01-12 19:29:25 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/48091)
5 years, 11 months ago (2015-01-12 19:58:31 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/714273004/460001
5 years, 11 months ago (2015-01-15 20:53:54 UTC) #59
commit-bot: I haz the power
Committed patchset #15 (id:460001)
5 years, 11 months ago (2015-01-15 22:53:21 UTC) #60
commit-bot: I haz the power
5 years, 11 months ago (2015-01-15 22:54:15 UTC) #61
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/95dc1d73331ddd636c4abb6bf4b9d5e665fd5449
Cr-Commit-Position: refs/heads/master@{#311744}

Powered by Google App Engine
This is Rietveld 408576698