diff options
author | Felipe Leme <felipeal@google.com> | 2016-02-22 18:07:49 -0800 |
---|---|---|
committer | Felipe Leme <felipeal@google.com> | 2016-02-23 09:40:13 -0800 |
commit | 510e922e47fec69839dd48c5473540f93d79a508 (patch) | |
tree | c1347560b7e1c194c7f28ddddad26280701726ec /packages/Shell/src | |
parent | 6605bd89c53494b59717a826f9a17641bc32da41 (diff) |
Created counter (tron_varz_dumpstate_duration) for dumpstate duration.
BUG: 26759986
Change-Id: I18534c127b35776a03e31b9d5cd190d864dff9e6
Diffstat (limited to 'packages/Shell/src')
-rw-r--r-- | packages/Shell/src/com/android/shell/BugreportProgressService.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java index d8b0571c364f..20aca0efc6ad 100644 --- a/packages/Shell/src/com/android/shell/BugreportProgressService.java +++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java @@ -769,6 +769,12 @@ public class BugreportProgressService extends Service { info.renameScreenshots(mScreenshotsDir); info.bugreportFile = bugreportFile; + final int max = intent.getIntExtra(EXTRA_MAX, -1); + if (max != -1) { + MetricsLogger.histogram(this, "dumpstate_duration", max); + info.max = max; + } + final File screenshot = getFileExtra(intent, EXTRA_SCREENSHOT); if (screenshot != null) { info.addScreenshot(screenshot); @@ -1541,7 +1547,7 @@ public class BugreportProgressService extends Service { return "id: " + id + ", pid: " + pid + ", name: " + name + ", finished: " + finished + "\n\ttitle: " + title + "\n\tdescription: " + description + "\n\tfile: " + bugreportFile + "\n\tscreenshots: " + screenshotFiles - + "\n\tprogress: " + progress + "/" + max + "(" + percent + ")" + + "\n\tprogress: " + progress + "/" + max + " (" + percent + ")" + "\n\tlast_update: " + getFormattedLastUpdate() + "\naddingDetailsToZip: " + addingDetailsToZip + " addedDetailsToZip: " + addedDetailsToZip; |