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

Unified Diff: sql/connection.cc

Issue 14439007: Deeper histogram for SQLITE_IOERR. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebaseline Created 7 years, 8 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/connection.cc
diff --git a/sql/connection.cc b/sql/connection.cc
index 5f6b5906e0c136e77618bd8eb4ed8ce9bf1855df..29708e41164a95376d4ae7deb392214647b04e63 100644
--- a/sql/connection.cc
+++ b/sql/connection.cc
@@ -714,6 +714,15 @@ int Connection::OnSqliteError(int err, sql::Statement *stmt) {
static size_t kSqliteErrorMax = 50;
UMA_HISTOGRAM_ENUMERATION("Sqlite.Error", base_err, kSqliteErrorMax);
+ if (base_err == SQLITE_IOERR) {
+ // TODO(shess): Consider folding the IOERR range into the main
+ // histogram directly. Perhaps 30..49? The downside risk would
+ // be that SQLite core adds a bunch of codes and this becomes a
+ // complicated mapping.
+ static size_t kSqliteIOErrorMax = 20;
+ UMA_HISTOGRAM_ENUMERATION("Sqlite.Error.IOERR", err>>8, kSqliteIOErrorMax);
+ }
+
if (!error_histogram_name_.empty()) {
// TODO(shess): The histogram macros create a bit of static
// storage for caching the histogram object. Since SQLite is
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698