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

Unified Diff: components/browser_watcher/postmortem_report_collector.cc

Issue 2883103002: Quantify instability according to the stability instrumentation (Closed)
Patch Set: Created 3 years, 7 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
Index: components/browser_watcher/postmortem_report_collector.cc
diff --git a/components/browser_watcher/postmortem_report_collector.cc b/components/browser_watcher/postmortem_report_collector.cc
index 35cc7b455b39c324162f31fb73c046d88fda9e93..0d213b0013cf82969c383328ce97e742d6f11a05 100644
--- a/components/browser_watcher/postmortem_report_collector.cc
+++ b/components/browser_watcher/postmortem_report_collector.cc
@@ -63,7 +63,8 @@ PostmortemReportCollector::PostmortemReportCollector(
: product_name_(product_name),
version_number_(version_number),
channel_name_(channel_name),
- system_session_analyzer_(analyzer) {}
+ system_session_analyzer_(analyzer),
+ unclean_system_cnt_(0) {}
PostmortemReportCollector::~PostmortemReportCollector() {}
@@ -75,6 +76,7 @@ int PostmortemReportCollector::CollectAndSubmitAllPendingReports(
DCHECK_NE(true, debug_info_dir.empty());
DCHECK_NE(true, debug_file_pattern.empty());
DCHECK_NE(nullptr, report_database);
+ unclean_system_cnt_ = 0;
Sigurður Ásgeirsson 2017/05/15 20:18:04 looks like rather than a member variable, you want
manzagop (departed) 2017/05/17 22:31:56 Yes! Done.
// Collect the list of files to harvest.
std::vector<FilePath> debug_files = GetDebugStateFilePaths(
@@ -103,6 +105,11 @@ int PostmortemReportCollector::CollectAndSubmitAllPendingReports(
++success_cnt;
}
+ UMA_STABILITY_HISTOGRAM_COUNTS_100(
+ "ActivityTracker.Collect.UncleanShutdownCount", success_cnt);
+ UMA_STABILITY_HISTOGRAM_COUNTS_100(
Sigurður Ásgeirsson 2017/05/15 20:18:04 is it possible to test these metrics - it'd be pre
manzagop (departed) 2017/05/17 22:31:56 I've added some histogram testing.
+ "ActivityTracker.Collect.UncleanSystemCount", unclean_system_cnt_);
+
return success_cnt;
}
@@ -256,6 +263,7 @@ void PostmortemReportCollector::RecordSystemShutdownState(
break;
case SystemSessionAnalyzer::UNCLEAN:
session_state = SystemState::UNCLEAN;
+ unclean_system_cnt_++;
break;
case SystemSessionAnalyzer::OUTSIDE_RANGE:
status = SYSTEM_SESSION_ANALYSIS_OUTSIDE_RANGE;

Powered by Google App Engine
This is Rietveld 408576698