New issue
Advanced search Search tips

Issue 878641 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature



Sign in to add a comment

Add Chrome histogram support to Tast

Project Member Reported by derat@chromium.org, Aug 29

Issue description

To support tests similar to video_ChromeHWDecodeUsed, Tast needs to be able to read Chrome histograms.

To avoid some of the issues we've seen in the Autotest chrome://histograms-parsing code (see e.g.  issue 844755 ), I plan to add a new getHistogram function to the chrome.autotestPrivate API.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/578d34ff919dcd98060bec266dff396915b7ba18

commit 578d34ff919dcd98060bec266dff396915b7ba18
Author: Daniel Erat <derat@chromium.org>
Date: Mon Sep 03 15:50:39 2018

tast-tests: Add chrome.ExtraArgs.

Add a new ExtraArgs functional option to the chrome package
that can be used to supply arbitrary arguments to append to
Chrome's command line. Also remove the existing MashEnabled
option and update the ui.MashLogin test to use ExtraArgs
instead.

I'm planning to add another test that needs a one-off flag,
and adding a new option every time this is needed doesn't
feel scalable. Let's only use options to control behavior
that needs additional configuration.

BUG= chromium:878641 
TEST=ui.MashLogin still passes

Change-Id: I6cf3e4a5d9c58db3fdad762cb4e462512f5524e8
Reviewed-on: https://chromium-review.googlesource.com/1201342
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[modify] https://crrev.com/578d34ff919dcd98060bec266dff396915b7ba18/src/chromiumos/tast/local/chrome/chrome.go
[modify] https://crrev.com/578d34ff919dcd98060bec266dff396915b7ba18/src/chromiumos/tast/local/bundles/cros/ui/mash_login.go

Project Member

Comment 2 by bugdroid1@chromium.org, Sep 5

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

commit a3d4e9c3567b9a10087809570a94724160d835bc
Author: Daniel Erat <derat@chromium.org>
Date: Wed Sep 05 20:36:13 2018

chromeos: Add --external-metrics-collection-interval.

Add a switch that can be used to supply an alternate
interval (in seconds) between the ExternalMetrics class
reading UMA events and histograms reported by Chrome OS
system daemons from /var/lib/metrics/uma-events.

I intend to use this in a test that will verify this
reporting path (without needing to wait the current default
of 30 seconds).

Bug:  878641 
Change-Id: I83f3ba70b7c32ddd598e1793a71900ef5b72b667
Reviewed-on: https://chromium-review.googlesource.com/1202023
Commit-Queue: Dan Erat <derat@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588991}
[modify] https://crrev.com/a3d4e9c3567b9a10087809570a94724160d835bc/chrome/browser/chromeos/external_metrics.cc
[modify] https://crrev.com/a3d4e9c3567b9a10087809570a94724160d835bc/chrome/browser/chromeos/external_metrics.h
[modify] https://crrev.com/a3d4e9c3567b9a10087809570a94724160d835bc/chrome/browser/chromeos/external_metrics_unittest.cc
[modify] https://crrev.com/a3d4e9c3567b9a10087809570a94724160d835bc/chromeos/chromeos_switches.cc
[modify] https://crrev.com/a3d4e9c3567b9a10087809570a94724160d835bc/chromeos/chromeos_switches.h

Project Member

Comment 3 by bugdroid1@chromium.org, Sep 5

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

commit efaabc2693ccbabac48dc4b3f38c2fefec8ae87b
Author: Daniel Erat <derat@chromium.org>
Date: Wed Sep 05 21:03:36 2018

chromeos: Add autotestPrivate.getHistogram function.

Add a getHistogram function to the chrome.autotestPrivate
that Chrome OS integration tests can call to get data about
a given histogram. This will hopefully be more reliable than
the current approach of parsing chrome://histograms.

Bug:  878641 ,  844755 
Change-Id: I9077c297a69742b9e225eefed52fe4b012d796fa
Reviewed-on: https://chromium-review.googlesource.com/1200840
Commit-Queue: Dan Erat <derat@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588996}
[modify] https://crrev.com/efaabc2693ccbabac48dc4b3f38c2fefec8ae87b/chrome/browser/extensions/api/autotest_private/autotest_private_api.cc
[modify] https://crrev.com/efaabc2693ccbabac48dc4b3f38c2fefec8ae87b/chrome/browser/extensions/api/autotest_private/autotest_private_api.h
[modify] https://crrev.com/efaabc2693ccbabac48dc4b3f38c2fefec8ae87b/chrome/common/extensions/api/autotest_private.idl
[modify] https://crrev.com/efaabc2693ccbabac48dc4b3f38c2fefec8ae87b/chrome/test/data/extensions/api_test/autotest_private/test.js
[modify] https://crrev.com/efaabc2693ccbabac48dc4b3f38c2fefec8ae87b/extensions/browser/extension_function_histogram_value.h
[modify] https://crrev.com/efaabc2693ccbabac48dc4b3f38c2fefec8ae87b/tools/metrics/histograms/enums.xml

Project Member

Comment 4 by bugdroid1@chromium.org, Sep 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/0e96b2f03c4cf7ab915d63125156d67e23b2a66f

commit 0e96b2f03c4cf7ab915d63125156d67e23b2a66f
Author: Daniel Erat <derat@chromium.org>
Date: Mon Sep 10 11:30:03 2018

tast-tests: Add platform.Histograms test.

Add a new chromiumos/tast/local/chrome/metrics package
containing a GetHistogram function that can be used to get
histograms from Chrome. It also contains WaitForHistogram
and WaitForHistogramUpdate helper functions that can be used
to wait for a histogram to appear or for a histogram to be
updated.

Also add a new platform.Histograms test that calls
metrics_client to verify the libmetrics->Chrome path that
Chrome OS system daemons use to report metrics.

BUG= chromium:878641 
TEST=platform.Histograms and new unit tests pass

Change-Id: I71604c347314bed4730b6bfcdfe9b0ecc24de7db
Reviewed-on: https://chromium-review.googlesource.com/1203633
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[add] https://crrev.com/0e96b2f03c4cf7ab915d63125156d67e23b2a66f/src/chromiumos/tast/local/chrome/metrics/doc.go
[add] https://crrev.com/0e96b2f03c4cf7ab915d63125156d67e23b2a66f/src/chromiumos/tast/local/chrome/metrics/histogram.go
[add] https://crrev.com/0e96b2f03c4cf7ab915d63125156d67e23b2a66f/src/chromiumos/tast/local/chrome/metrics/histogram_test.go
[modify] https://crrev.com/0e96b2f03c4cf7ab915d63125156d67e23b2a66f/src/chromiumos/tast/local/chrome/chrome.go
[add] https://crrev.com/0e96b2f03c4cf7ab915d63125156d67e23b2a66f/src/chromiumos/tast/local/bundles/cros/platform/histograms.go

Status: Fixed (was: Started)

Sign in to add a comment