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

Issue 2380183004: Fail gracefully if no Chrome trace or insufficient power samples (reland) (Closed)

Created:
4 years, 2 months ago by alexandermont
Modified:
4 years, 2 months ago
CC:
catapult-reviews_chromium.org, tracing-review_chromium.org
Target Ref:
refs/heads/master
Project:
catapult
Visibility:
Public.

Description

Fail gracefully if no Chrome trace or insufficient power samples (reland) This is a reland of https://codereview.chromium.org/2371873002 to fix the bug linked below. (The problem was that the tests use only the RAIL stage tracing category, which includes only renderer events and not browser events, so looking for the browser when computing bounds of Chrome trace was throwing an error. I changed it to only consider renderer processes when computing these bounds, since the metrics are based on RAIL stages and only renderer events are relevant for RAIL stages.) BUG=chromium:650306 Committed: https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/e87e17fbfb63cbe0e79be5c62ae7600bf320b62d

Patch Set 1 #

Patch Set 2 : remove extraneous change #

Total comments: 22

Patch Set 3 : code cleanup #

Total comments: 4

Patch Set 4 : fix whitespace #

Unified diffs Side-by-side diffs Delta from patch set Stats (+438 lines, -133 lines) Patch
M tracing/tracing/metrics/system_health/power_metric.html View 1 2 3 7 chunks +75 lines, -23 lines 0 comments Download
M tracing/tracing/metrics/system_health/power_metric_test.html View 1 2 3 10 chunks +363 lines, -110 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
alexandermont
4 years, 2 months ago (2016-09-30 19:30:18 UTC) #2
rnephew (Reviews Here)
Adding owners.
4 years, 2 months ago (2016-09-30 19:50:17 UTC) #4
rnephew (Reviews Here)
On 2016/09/30 19:50:17, rnephew (Reviews Here) wrote: > Adding owners. Also, just a tip for ...
4 years, 2 months ago (2016-09-30 19:51:26 UTC) #5
benjhayden
lgtm but please wait for Ned to clarify whether the console.error()s should be exceptions instead. ...
4 years, 2 months ago (2016-10-03 18:09:03 UTC) #7
nednguyen
On 2016/10/03 18:09:03, benjhayden wrote: > lgtm but please wait for Ned to clarify whether ...
4 years, 2 months ago (2016-10-03 18:16:10 UTC) #10
nednguyen
On 2016/10/03 18:16:10, nednguyen wrote: > On 2016/10/03 18:09:03, benjhayden wrote: > > lgtm but ...
4 years, 2 months ago (2016-10-03 18:28:05 UTC) #11
charliea (OOO until 10-5)
https://codereview.chromium.org/2380183004/diff/20001/tracing/tracing/metrics/system_health/power_metric.html File tracing/tracing/metrics/system_health/power_metric.html (right): https://codereview.chromium.org/2380183004/diff/20001/tracing/tracing/metrics/system_health/power_metric.html#newcode271 tracing/tracing/metrics/system_health/power_metric.html:271: function getChromeBounds(model) { In line with your other functions, ...
4 years, 2 months ago (2016-10-04 14:48:59 UTC) #12
alexandermont
https://codereview.chromium.org/2380183004/diff/20001/tracing/tracing/metrics/system_health/power_metric.html File tracing/tracing/metrics/system_health/power_metric.html (right): https://codereview.chromium.org/2380183004/diff/20001/tracing/tracing/metrics/system_health/power_metric.html#newcode271 tracing/tracing/metrics/system_health/power_metric.html:271: function getChromeBounds(model) { On 2016/10/04 at 14:48:58, charliea (OOO ...
4 years, 2 months ago (2016-10-04 18:37:06 UTC) #13
charliea (OOO until 10-5)
lgtm w/ comments https://codereview.chromium.org/2380183004/diff/40001/tracing/tracing/metrics/system_health/power_metric.html File tracing/tracing/metrics/system_health/power_metric.html (right): https://codereview.chromium.org/2380183004/diff/40001/tracing/tracing/metrics/system_health/power_metric.html#newcode300 tracing/tracing/metrics/system_health/power_metric.html:300: throw new PowerMetricException('No Chrome trace'); (here ...
4 years, 2 months ago (2016-10-06 16:27:56 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2380183004/60001
4 years, 2 months ago (2016-10-11 18:13:03 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/e87e17fbfb63cbe0e79be5c62ae7600bf320b62d
4 years, 2 months ago (2016-10-11 18:31:46 UTC) #19
alexandermont
4 years, 2 months ago (2016-10-11 20:42:54 UTC) #20
Message was sent while issue was closed.
https://codereview.chromium.org/2380183004/diff/40001/tracing/tracing/metrics...
File tracing/tracing/metrics/system_health/power_metric.html (right):

https://codereview.chromium.org/2380183004/diff/40001/tracing/tracing/metrics...
tracing/tracing/metrics/system_health/power_metric.html:300: throw new
PowerMetricException('No Chrome trace');
On 2016/10/06 at 16:27:56, charliea wrote:
> (here and elsewhere): there are a couple of things you should probably do to
make these exceptions more "trace-viewery"
> 
> 1) I think that in a lot of these cases, we could make it clearer about *why*
the exception is being thrown. For example, look at "No power series available".
This makes it clear what the condition resulting in the exception was, but it's
not clear *why* that condition is problematic, which makes it confusing to
anyone who sees the error down the road. More helpful text might be "Can't
calculate power metric due to missing power data", which makes it clear both
what the condition is and why that condition is resulting in an exception. This
future-proofs the exception.
> 
> 2) Rather than creating your own exception type (common in Python), I'd just
do "throw new Error" with the more specific text above (common in trace viewer).
See this code search
(https://cs.corp.google.com/search/?q=p:github+f:%5Ecatapult-project/catapult/...)
for how common this idiom is in trace viewer. 
> 
> Hope that helps.

Done

https://codereview.chromium.org/2380183004/diff/40001/tracing/tracing/metrics...
tracing/tracing/metrics/system_health/power_metric.html:322: chromeBounds)) {
On 2016/10/06 at 16:27:56, charliea wrote:
> nit: line continuation should be four spaces, not two
> 
> (Also went ahead and filed
https://github.com/catapult-project/catapult/issues/2909 so that one of us can
enable this as a presubmit check)

done

Powered by Google App Engine
This is Rietveld 408576698