diff options
author | Jay Srinivasan <jaysri@chromium.org> | 2013-01-10 19:24:35 -0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-01-11 17:50:26 -0800 |
commit | 55f50c24c2624487b803ba2f93588494cc69e523 (patch) | |
tree | 2df7821b309db277cd9a96314a4c2c5678a120f3 /action_processor.h | |
parent | 95931b8f3b1b53cb337c8359c0495e2798863318 (diff) |
Segregate UMA metrics for production scenarios from test scenarios.
Currently we separate the UMA metrics only by one category: whether the
device is in dev mode or not. In addition, we need to exclude the noise
from these two categories:
1. Most of our testing on MP-signed images which are performed
with autest.
2. All our hwlab tests run in non-dev mode but they use dev-signed images
with dev-firmware keys.
So this CL defines additional bit fields to represent these states and
if any of these three flags are set, the UMA metric is sent to a
DevModeErrorCodes bucket. Thus the NormalErrorCodes bucket will have only
the production errors and thus we can monitor more effectively.
BUG=chromium-os:37613
TEST=Updated unit tests, ran on ZGB for all scenarios.
Change-Id: Id9cce33f09d1cc50cb15e67c731f7548940cbc24
Reviewed-on: https://gerrit.chromium.org/gerrit/41103
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Jay Srinivasan <jaysri@chromium.org>
Tested-by: Jay Srinivasan <jaysri@chromium.org>
Diffstat (limited to 'action_processor.h')
-rw-r--r-- | action_processor.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/action_processor.h b/action_processor.h index 7c425dea..58616b5c 100644 --- a/action_processor.h +++ b/action_processor.h @@ -92,13 +92,26 @@ enum ActionExitCode { // TODO(jaysri): Move out all the bit masks into separate constants // outside the enum as part of fixing bug 34369. // Bit flags. Remember to update the mask below for new bits. - kActionCodeResumedFlag = 1 << 30, // Set if resuming an interruped update. - kActionCodeBootModeFlag = 1 << 31, // Set if boot mode not normal. - // Mask to be used to extract the actual code without the higher-order - // bit flags (for reporting to UMA which requires small contiguous - // enum values) - kActualCodeMask = ~(kActionCodeResumedFlag | kActionCodeBootModeFlag) + // Set if boot mode not normal. + kActionCodeDevModeFlag = 1 << 31, + + // Set if resuming an interruped update. + kActionCodeResumedFlag = 1 << 30, + + // Set if using a dev/test image as opposed to an MP-signed image. + kActionCodeTestImageFlag = 1 << 29, + + // Set if using devserver or Omaha sandbox (using crosh autest). + kActionCodeTestOmahaUrlFlag = 1 << 28, + + // Mask that indicates bit positions that are used to indicate special flags + // that are embedded in the error code to provide additional context about + // the system in which the error was encountered. + kSpecialFlags = (kActionCodeDevModeFlag | + kActionCodeResumedFlag | + kActionCodeTestImageFlag | + kActionCodeTestOmahaUrlFlag) }; class AbstractAction; |