New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 850580 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

base::HistogramTester to dump all histograms recorded for debugging purposes

Project Member Reported by wfh@chromium.org, Jun 7 2018

Issue description

When adding a new test sometimes it's nice to just code the correct behavior then look at histograms generated to see what values to add expectations for in the test. It would be nice if base::HistogramTester had a method to just LOG all the current histograms for this purpose.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 13 2018

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

commit 6690bcd94e5712545596524045319d9c1a16b44a
Author: Will Harris <wfh@chromium.org>
Date: Wed Jun 13 15:54:01 2018

Expose a method on base::HistogramTester to dump all histograms.

Note: this will dump all buckets for any changed histogram, not
just the buckets in the histogram that changed.

BUG= 850580 

Change-Id: I75815cfe1e83501a6e71f9591dc0321f2fc5a62d
Reviewed-on: https://chromium-review.googlesource.com/1091213
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566849}
[modify] https://crrev.com/6690bcd94e5712545596524045319d9c1a16b44a/base/test/metrics/histogram_tester.cc
[modify] https://crrev.com/6690bcd94e5712545596524045319d9c1a16b44a/base/test/metrics/histogram_tester.h
[modify] https://crrev.com/6690bcd94e5712545596524045319d9c1a16b44a/base/test/metrics/histogram_tester_unittest.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 13 2018

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

commit 0aacf5cbeef4375b6ad0ffc4305329b8bdd27058
Author: Will Harris <wfh@chromium.org>
Date: Wed Jun 13 16:57:50 2018

Remove LOG line accidently left in from previous commit.

BUG= 850580 

Change-Id: I4ee21e0a6417431c02fd16b6bcf4972918157b94
Reviewed-on: https://chromium-review.googlesource.com/1099189
Commit-Queue: Will Harris <wfh@chromium.org>
Commit-Queue: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566877}
[modify] https://crrev.com/0aacf5cbeef4375b6ad0ffc4305329b8bdd27058/base/test/metrics/histogram_tester_unittest.cc

Comment 3 by wfh@chromium.org, Jun 19 2018

Status: Fixed (was: Untriaged)
the API is GetAllHistogramsRecorded()

Sign in to add a comment