Merge "Created counter (tron_varz_dumpstate_duration) for dumpstate duration." into nyc-dev

am: fe9731f4f2

* commit 'fe9731f4f287560d43f9af48c5be555e8a727955':
  Created counter (tron_varz_dumpstate_duration) for dumpstate duration.
This commit is contained in:
Felipe Leme
2016-02-23 18:20:50 +00:00
committed by android-build-merger

View File

@@ -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;