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

Unified Diff: chromecast/browser/metrics/cast_stability_metrics_provider.cc

Issue 1320153002: Add new termination status for failed launch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and a nit. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/chromedriver/chrome_launcher.cc ('k') | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/metrics/cast_stability_metrics_provider.cc
diff --git a/chromecast/browser/metrics/cast_stability_metrics_provider.cc b/chromecast/browser/metrics/cast_stability_metrics_provider.cc
index 96a0f28f5ed610306d63a656d6ad853046cc7bfb..5fb1395eff8494df582cd7332960cdce5f034e79 100644
--- a/chromecast/browser/metrics/cast_stability_metrics_provider.cc
+++ b/chromecast/browser/metrics/cast_stability_metrics_provider.cc
@@ -27,6 +27,15 @@ namespace metrics {
namespace {
+enum RendererType {
+ RENDERER_TYPE_RENDERER,
+ RENDERER_TYPE_EXTENSION, // Not used, but needed for correct histogram count.
+ // NOTE: Add new action types only immediately above this line. Also,
+ // make sure the enum list in tools/metrics/histograms/histograms.xml is
+ // updated with any change in here.
+ RENDERER_TYPE_COUNT
+};
+
void IncrementPrefValue(const char* path) {
PrefService* pref = shell::CastBrowserProcess::GetInstance()->pref_service();
DCHECK(pref);
@@ -155,11 +164,16 @@ void CastStabilityMetricsProvider::LogRendererCrash(
UMA_HISTOGRAM_SPARSE_SLOWLY("CrashExitCodes.Renderer",
MapCrashExitCodeForHistogram(exit_code));
- UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.ChildCrashes", 1);
+ UMA_HISTOGRAM_ENUMERATION("BrowserRenderProcessHost.ChildCrashes",
+ RENDERER_TYPE_RENDERER, RENDERER_TYPE_COUNT);
} else if (status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED) {
- UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.ChildKills", 1);
+ UMA_HISTOGRAM_ENUMERATION("BrowserRenderProcessHost.ChildKills",
+ RENDERER_TYPE_RENDERER, RENDERER_TYPE_COUNT);
} else if (status == base::TERMINATION_STATUS_STILL_RUNNING) {
- UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.DisconnectedAlive", 1);
+ UMA_HISTOGRAM_ENUMERATION("BrowserRenderProcessHost.DisconnectedAlive",
+ RENDERER_TYPE_RENDERER, RENDERER_TYPE_COUNT);
+ } else if (status == base::TERMINATION_STATUS_LAUNCH_FAILED) {
+ IncrementPrefValue(prefs::kStabilityRendererCrashCount);
}
}
« no previous file with comments | « chrome/test/chromedriver/chrome_launcher.cc ('k') | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698