New issue
Advanced search Search tips

Issue 722649 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: May 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

metrics.SecondsTimer will not record if an exception is raised.

Project Member Reported by dgarr...@chromium.org, May 16 2017

Issue description

metrics.SecondsTimer does not trap an exception during "yield f" which means that if an exception is raised while we are timing something, no timing information is recorded.

Is this intentional?

https://docs.python.org/2/library/contextlib.html
 
Hmm. That's a bug.
Status: Started (was: Untriaged)

Comment 3 by aut...@google.com, May 16 2017

Labels: -current-issue
Project Member

Comment 4 by bugdroid1@chromium.org, May 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/9506b06a48650432b95fcf13e86ada0337f6a25d

commit 9506b06a48650432b95fcf13e86ada0337f6a25d
Author: Aviv Keshet <akeshet@chromium.org>
Date: Thu May 18 02:06:31 2017

metrics: fix SecondsTimer to work if timed thing throws exception

BUG= chromium:722649 
TEST=unittest added; new test fails prior to fix

Change-Id: Iefe5a7ee2ebc120315a22e12594ad0ecb40988d7
Reviewed-on: https://chromium-review.googlesource.com/506603
Commit-Ready: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>

[modify] https://crrev.com/9506b06a48650432b95fcf13e86ada0337f6a25d/lib/metrics_unittest.py
[modify] https://crrev.com/9506b06a48650432b95fcf13e86ada0337f6a25d/lib/metrics.py

Status: Fixed (was: Started)

Comment 6 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 7 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment