New issue
Advanced search Search tips

Issue 916754 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 17
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocking:
issue 915892



Sign in to add a comment

Bluetooth.MacOS.Errors.DidDiscoverPrimaryServices Should Be a SparseHistogram

Project Member Reported by bcwh...@chromium.org, Dec 19

Issue description

The Bluetooth.MacOS.Errors.DidDiscoverPrimaryServices and friends histograms have over 2000 buckets which is a lot of memory used for empty ranges and values unlikely to occur.

Please change them from LinearHistogram to SparseHistogram.  You will not have to rename your metrics in histograms.xml for this change as "sparse" is completely compatible with "enumeration".

https://cs.chromium.org/chromium/src/device/bluetooth/bluetooth_adapter_mac_metrics.mm?rcl=2f01a0cb03732fdb982dd42786d95736322d2241&l=149

 
Cc: device-dev@chromium.org
Components: Blink>Bluetooth
Owner: scheib@chromium.org
Status: Available (was: Untriaged)
Owner: ----
Status: Untriaged (was: Available)
scheib@ is no longer working on Chromium. Marking this untriaged so it shows up in our weekly triage meeting.
Cc: -device-dev@chromium.org
Components: -Blink>Bluetooth IO>Bluetooth
Labels: OS-Mac
Owner: jameshollyer@chromium.org
Status: Assigned (was: Untriaged)
James will take a look at converting the histogram to sparse.

Comment 4 by jameshollyer@chromium.org, Jan 17 (5 days ago)

Status: Fixed (was: Assigned)
Switched all bluetooth adapter metrics to sparse histograms in this CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1414615
Project Member

Comment 5 by bugdroid1@chromium.org, Jan 17 (5 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/213cbbc0c432ea82e85bcf175e3905ee31478577

commit 213cbbc0c432ea82e85bcf175e3905ee31478577
Author: James Hollyer <jameshollyer@chromium.org>
Date: Thu Jan 17 21:46:49 2019

Use sparse histograms on bluetooth adapter metrics

The bluetooth adapter metrics have very few possible error codes and
they are very spread apart so a sparse histogram is much more
appropriate then a regular histogram, which is what was used before,
and will save memory. These histograms are also now being tested.

Bug:  916754 
Change-Id: I291829b898e3e00af1c71d00581fe91346dfa169
Reviewed-on: https://chromium-review.googlesource.com/c/1414615
Commit-Queue: James Hollyer <jameshollyer@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623863}
[modify] https://crrev.com/213cbbc0c432ea82e85bcf175e3905ee31478577/device/BUILD.gn
[modify] https://crrev.com/213cbbc0c432ea82e85bcf175e3905ee31478577/device/bluetooth/bluetooth_adapter_mac_metrics.mm
[add] https://crrev.com/213cbbc0c432ea82e85bcf175e3905ee31478577/device/bluetooth/bluetooth_adapter_mac_metrics_unittest.mm
[modify] https://crrev.com/213cbbc0c432ea82e85bcf175e3905ee31478577/device/bluetooth/test/bluetooth_test.h
[modify] https://crrev.com/213cbbc0c432ea82e85bcf175e3905ee31478577/device/bluetooth/test/bluetooth_test_mac.h
[modify] https://crrev.com/213cbbc0c432ea82e85bcf175e3905ee31478577/device/bluetooth/test/bluetooth_test_mac.mm
[modify] https://crrev.com/213cbbc0c432ea82e85bcf175e3905ee31478577/device/bluetooth/test/mock_bluetooth_cbdescriptor_mac.h
[modify] https://crrev.com/213cbbc0c432ea82e85bcf175e3905ee31478577/device/bluetooth/test/mock_bluetooth_cbdescriptor_mac.mm
[modify] https://crrev.com/213cbbc0c432ea82e85bcf175e3905ee31478577/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h
[modify] https://crrev.com/213cbbc0c432ea82e85bcf175e3905ee31478577/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm

Sign in to add a comment