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

Issue 1261593004: bluetooth: Add histograms and logging for requestDevice() (Closed)

Created:
5 years, 4 months ago by ortuno
Modified:
5 years, 4 months ago
CC:
asvitkine+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, scheib+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@bluetooth-adapter-ff
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Add histograms and logging for requestDevice() Four new histograms: - RequestDevice.Filters.Count: Number of filters used when scanning - RequestDevice.Filters.Services: Services used when scanning - RequestDevice.OptionalServices.Count: Number of optionalServices passed. - RequestDevice.OptionalServices.Services: Optional services - RequestDevice.UnionOfServices.Count: Number of services used. - RequestDevice.FilterSize: Number of services in a filter. One Rename: Bluetooth.RequestDevice.Outcome -> Bluetooth.Web.RequestDevice.Outcome Logging: - VLOG(1) filters used when scanning - VLOG(1) optional services used when scanning - VLOG(1) any errors before starting scan - VLOG(1) devices found and their UUIDs - VLOG(1) if no devices were found BUG=499636 Committed: https://crrev.com/f61dcf839472db5b0a8a3dc0f241929f17ddb8ff Cr-Commit-Position: refs/heads/master@{#343139}

Patch Set 1 : #

Total comments: 12

Patch Set 2 : Add union of services and # of filters. Remove services list. #

Total comments: 12

Patch Set 3 : Remove unnecessary VLOGs #

Patch Set 4 : Address asvitkine comments. #

Total comments: 17

Patch Set 5 : Use hash of UUID #

Total comments: 2

Patch Set 6 : Change macro #

Total comments: 2

Patch Set 7 : Use histogram_macros.h instead #

Total comments: 11

Patch Set 8 : Address jyasskin's comments #

Total comments: 5

Patch Set 9 : Remove old enum. Fix typoes #

Patch Set 10 : Remove unnecessary include #

Total comments: 4

Patch Set 11 : Address scheib's comments #

Patch Set 12 : Use SuperFastHash directly. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -15 lines) Patch
M content/browser/bluetooth/bluetooth_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +73 lines, -3 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 5 chunks +132 lines, -12 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 48 (13 generated)
ortuno
@jyasskin: PTAL https://codereview.chromium.org/1261593004/diff/1/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/1/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode417 content/browser/bluetooth/bluetooth_dispatcher_host.cc:417: VLOG(1) << "requestDevice called with the following ...
5 years, 4 months ago (2015-08-03 23:49:35 UTC) #2
ortuno
@jyasskin: ping?
5 years, 4 months ago (2015-08-05 16:01:35 UTC) #7
Jeffrey Yasskin
https://codereview.chromium.org/1261593004/diff/80001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/80001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode107 content/browser/bluetooth/bluetooth_dispatcher_host.cc:107: std::map<BluetoothUUID, UMAGATTServices>* getServiceToEnumMap() { I don't really like having ...
5 years, 4 months ago (2015-08-05 19:03:49 UTC) #8
ortuno
https://codereview.chromium.org/1261593004/diff/80001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1261593004/diff/80001/tools/metrics/histograms/histograms.xml#newcode2724 tools/metrics/histograms/histograms.xml:2724: +<histogram name="Bluetooth.Web.RequestDevice.Filters.Count" units="filters"> On 2015/08/05 at 19:03:49, Jeffrey Yasskin ...
5 years, 4 months ago (2015-08-05 22:05:12 UTC) #10
Jeffrey Yasskin
https://codereview.chromium.org/1261593004/diff/80001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1261593004/diff/80001/tools/metrics/histograms/histograms.xml#newcode2724 tools/metrics/histograms/histograms.xml:2724: +<histogram name="Bluetooth.Web.RequestDevice.Filters.Count" units="filters"> On 2015/08/05 22:05:12, ortuno wrote: > ...
5 years, 4 months ago (2015-08-05 22:55:41 UTC) #11
ortuno
@asvitkine: Could you take a look at histograms.xml? https://codereview.chromium.org/1261593004/diff/80001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/80001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode107 content/browser/bluetooth/bluetooth_dispatcher_host.cc:107: std::map<BluetoothUUID, ...
5 years, 4 months ago (2015-08-10 20:05:51 UTC) #14
Alexei Svitkine (slow)
https://codereview.chromium.org/1261593004/diff/120001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/120001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode35 content/browser/bluetooth/bluetooth_dispatcher_host.cc:35: const char* kBaseStandardServiceUUID = "00001800-0000-1000-8000-00805f9b34fb"; Nit: const char kBaseStandardServiceUUID[] ...
5 years, 4 months ago (2015-08-10 20:12:45 UTC) #15
ortuno
On 2015/08/10 at 20:12:45, asvitkine wrote: > https://codereview.chromium.org/1261593004/diff/120001/content/browser/bluetooth/bluetooth_dispatcher_host.cc > File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): > > https://codereview.chromium.org/1261593004/diff/120001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode35 ...
5 years, 4 months ago (2015-08-10 20:16:38 UTC) #16
Alexei Svitkine (slow)
Do histograms provide enough information? If so, you can ask them to provide you the ...
5 years, 4 months ago (2015-08-10 20:19:07 UTC) #17
chromium-reviews
They do not. We want to know specific information about the devices the underlying platform ...
5 years, 4 months ago (2015-08-10 20:21:17 UTC) #18
Alexei Svitkine (slow)
I guess vlog is ok to use then. If it's something that's a common use ...
5 years, 4 months ago (2015-08-10 20:27:25 UTC) #19
ortuno
@asvitkine: PTAL https://codereview.chromium.org/1261593004/diff/120001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/120001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode35 content/browser/bluetooth/bluetooth_dispatcher_host.cc:35: const char* kBaseStandardServiceUUID = "00001800-0000-1000-8000-00805f9b34fb"; On 2015/08/10 ...
5 years, 4 months ago (2015-08-10 21:47:38 UTC) #20
Alexei Svitkine (slow)
I am ok with using vlogs here for the reasons you mention. https://codereview.chromium.org/1261593004/diff/160001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc ...
5 years, 4 months ago (2015-08-10 22:03:36 UTC) #21
Jeffrey Yasskin
https://codereview.chromium.org/1261593004/diff/160001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/160001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode38 content/browser/bluetooth/bluetooth_dispatcher_host.cc:38: const uint16_t kMaxStandardServiceUUID = 0x22; Let's not force ourselves ...
5 years, 4 months ago (2015-08-10 22:18:56 UTC) #22
Alexei Svitkine (slow)
https://codereview.chromium.org/1261593004/diff/160001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/160001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode82 content/browser/bluetooth/bluetooth_dispatcher_host.cc:82: service_enum <<= 4; On 2015/08/10 22:18:56, Jeffrey Yasskin wrote: ...
5 years, 4 months ago (2015-08-11 15:15:08 UTC) #23
ortuno
@asvitkine: Ready for review! https://codereview.chromium.org/1261593004/diff/160001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/160001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode38 content/browser/bluetooth/bluetooth_dispatcher_host.cc:38: const uint16_t kMaxStandardServiceUUID = 0x22; ...
5 years, 4 months ago (2015-08-11 20:10:56 UTC) #25
Alexei Svitkine (slow)
https://codereview.chromium.org/1261593004/diff/200001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/200001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode95 content/browser/bluetooth/bluetooth_dispatcher_host.cc:95: UMA_HISTOGRAM_ENUMERATION( Use UMA_HISTOGRAM_SPARSE_SLOWLY here and on line 84.
5 years, 4 months ago (2015-08-11 20:32:36 UTC) #26
ortuno
https://codereview.chromium.org/1261593004/diff/200001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/200001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode95 content/browser/bluetooth/bluetooth_dispatcher_host.cc:95: UMA_HISTOGRAM_ENUMERATION( On 2015/08/11 at 20:32:36, Alexei Svitkine wrote: > ...
5 years, 4 months ago (2015-08-11 20:35:11 UTC) #27
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/1261593004/diff/220001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/220001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode14 content/browser/bluetooth/bluetooth_dispatcher_host.cc:14: #include "base/metrics/histogram.h" Nit: Change this to histogram_macros.h
5 years, 4 months ago (2015-08-11 20:40:23 UTC) #28
ortuno
@asvitkine: Thanks! @jyasskin: PTAL https://codereview.chromium.org/1261593004/diff/220001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/220001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode14 content/browser/bluetooth/bluetooth_dispatcher_host.cc:14: #include "base/metrics/histogram.h" On 2015/08/11 at ...
5 years, 4 months ago (2015-08-11 20:46:48 UTC) #29
Jeffrey Yasskin
lgtm with the changes below. https://codereview.chromium.org/1261593004/diff/240001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/240001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode79 content/browser/bluetooth/bluetooth_dispatcher_host.cc:79: UMA_HISTOGRAM_COUNTS("Bluetooth.Web.RequestDevice.Filters.Count", Should these be ...
5 years, 4 months ago (2015-08-11 21:10:17 UTC) #30
ortuno
https://codereview.chromium.org/1261593004/diff/240001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/240001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode79 content/browser/bluetooth/bluetooth_dispatcher_host.cc:79: UMA_HISTOGRAM_COUNTS("Bluetooth.Web.RequestDevice.Filters.Count", On 2015/08/11 at 21:10:17, Jeffrey Yasskin wrote: > ...
5 years, 4 months ago (2015-08-11 21:53:27 UTC) #31
Jeffrey Yasskin
lgtm except for the misplaced hash comments. https://codereview.chromium.org/1261593004/diff/240001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (left): https://codereview.chromium.org/1261593004/diff/240001/tools/metrics/histograms/histograms.xml#oldcode2741 tools/metrics/histograms/histograms.xml:2741: enum="BluetoothRequestDeviceOutcome"> On ...
5 years, 4 months ago (2015-08-11 21:57:50 UTC) #32
Alexei Svitkine (slow)
If the two enums are identical, I thinking its better to not duplicate the definition. ...
5 years, 4 months ago (2015-08-11 22:00:16 UTC) #33
ortuno
https://codereview.chromium.org/1261593004/diff/260001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1261593004/diff/260001/tools/metrics/histograms/histograms.xml#newcode2793 tools/metrics/histograms/histograms.xml:2793: + is a 31-bit hash of the Service UUID. ...
5 years, 4 months ago (2015-08-11 22:21:53 UTC) #34
ortuno
@scheib: PTAL
5 years, 4 months ago (2015-08-11 22:22:25 UTC) #35
scheib
LGTM https://codereview.chromium.org/1261593004/diff/300001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/300001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode69 content/browser/bluetooth/bluetooth_dispatcher_host.cc:69: uint32 data = base::Hash(service.canonical_value()); base::Hash uses SuperFastHash, which ...
5 years, 4 months ago (2015-08-12 21:00:36 UTC) #36
ortuno
https://codereview.chromium.org/1261593004/diff/300001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1261593004/diff/300001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode69 content/browser/bluetooth/bluetooth_dispatcher_host.cc:69: uint32 data = base::Hash(service.canonical_value()); On 2015/08/12 at 21:00:36, scheib ...
5 years, 4 months ago (2015-08-12 21:16:26 UTC) #37
ortuno
Replace base::Hash with base::SuperFastHash. Also added comments to use the new histogram macro for fingerprints.
5 years, 4 months ago (2015-08-12 22:22:47 UTC) #38
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1261593004/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1261593004/340001
5 years, 4 months ago (2015-08-12 22:23:17 UTC) #40
scheib
LGTM
5 years, 4 months ago (2015-08-12 22:35:57 UTC) #41
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-13 00:41:56 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1261593004/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1261593004/340001
5 years, 4 months ago (2015-08-13 01:10:15 UTC) #46
commit-bot: I haz the power
Committed patchset #12 (id:340001)
5 years, 4 months ago (2015-08-13 01:14:36 UTC) #47
commit-bot: I haz the power
5 years, 4 months ago (2015-08-13 01:15:14 UTC) #48
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/f61dcf839472db5b0a8a3dc0f241929f17ddb8ff
Cr-Commit-Position: refs/heads/master@{#343139}

Powered by Google App Engine
This is Rietveld 408576698