diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-29 21:21:06 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-29 21:21:06 +0000 |
commit | cea0201e639979c0e7ca4f3a771f24621dba7ecc (patch) | |
tree | 4a13093e04bbf8d4dc6df62309c5e9220c3a919d /sql/connection.cc | |
parent | bab2cdd981b91bc13da24feec9437f7e50579736 (diff) | |
download | chromium_src-cea0201e639979c0e7ca4f3a771f24621dba7ecc.zip chromium_src-cea0201e639979c0e7ca4f3a771f24621dba7ecc.tar.gz chromium_src-cea0201e639979c0e7ca4f3a771f24621dba7ecc.tar.bz2 |
Deeper histogram for SQLITE_IOERR.
Sqlite.Error records the basic SQLite error codes. Most of the
extended codes are under SQLITE_IOERR, add a new histogram to record
those.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/14439007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197147 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sql/connection.cc')
-rw-r--r-- | sql/connection.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/connection.cc b/sql/connection.cc index 5f6b590..29708e4 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 |