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

Issue 1145833002: [sql] Stats gathering for sql/ APIs. (Closed)

Created:
5 years, 7 months ago by Scott Hess - ex-Googler
Modified:
5 years, 6 months ago
CC:
chromium-reviews, asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[sql] Stats gathering for sql/ APIs. Generate stats for how many SQL statements are executed, how many results they return, and how many changes they make. Generate timing values for how long is spent doing all queries, doing updating operations, doing autocommit updates, and commiting transactions. The goal of these metrics is to quantify results of decisions like enabling write-ahead log or memory-mapped I/O. BUG=489788, 489444 Committed: https://crrev.com/58b8df8572e25ff91b3073213651aed4ebd675b5 Cr-Commit-Position: refs/heads/master@{#332503}

Patch Set 1 #

Patch Set 2 : Fix build breaks. BUILD.gn needs to follow sql.gyp, tracker had histogram tag set after open, EVEN… #

Total comments: 22

Patch Set 3 : in-memory for timing, fix int mismatch for windows #

Total comments: 3

Patch Set 4 : GetMediumTimeHistogram() helper, Record prefix for helpers, comment tweaks, StepInternal(), only ti… #

Patch Set 5 : Add mockable time source. Then mock it mercilessly. #

Total comments: 4

Patch Set 6 : Break up tests into smaller bits. #

Total comments: 6

Patch Set 7 : asvitkine nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+902 lines, -25 lines) Patch
M sql/BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
M sql/connection.h View 1 2 3 4 5 6 7 chunks +115 lines, -5 lines 0 comments Download
M sql/connection.cc View 1 2 3 4 5 6 9 chunks +182 lines, -4 lines 0 comments Download
M sql/connection_unittest.cc View 1 2 3 4 5 6 4 chunks +418 lines, -0 lines 0 comments Download
A sql/proxy.h View 1 2 3 4 5 6 1 chunk +39 lines, -0 lines 0 comments Download
A sql/proxy.cc View 1 2 3 4 5 6 1 chunk +28 lines, -0 lines 0 comments Download
M sql/sql.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M sql/statement.h View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M sql/statement.cc View 1 2 3 4 1 chunk +43 lines, -14 lines 0 comments Download
M storage/browser/database/database_tracker.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 6 chunks +59 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (6 generated)
Scott Hess - ex-Googler
I've been meaning to land a couple stats-related CLs to inform enabling mmap mode, so ...
5 years, 7 months ago (2015-05-19 23:57:49 UTC) #2
rmcilroy
Looks pretty good, a couple of suggestions. https://codereview.chromium.org/1145833002/diff/20001/sql/connection.cc File sql/connection.cc (right): https://codereview.chromium.org/1145833002/diff/20001/sql/connection.cc#newcode1029 sql/connection.cc:1029: base::HistogramBase::kUmaTargetedHistogramFlag); Maybe ...
5 years, 7 months ago (2015-05-21 22:54:48 UTC) #3
Scott Hess - ex-Googler
Thanks much for the feedback! https://codereview.chromium.org/1145833002/diff/20001/sql/connection.cc File sql/connection.cc (right): https://codereview.chromium.org/1145833002/diff/20001/sql/connection.cc#newcode1029 sql/connection.cc:1029: base::HistogramBase::kUmaTargetedHistogramFlag); On 2015/05/21 22:54:48, ...
5 years, 7 months ago (2015-05-21 23:42:37 UTC) #4
rmcilroy
https://codereview.chromium.org/1145833002/diff/20001/sql/connection.h File sql/connection.h (right): https://codereview.chromium.org/1145833002/diff/20001/sql/connection.h#newcode40 sql/connection.h:40: } On 2015/05/21 23:42:37, Scott Hess wrote: > On ...
5 years, 7 months ago (2015-05-22 08:48:23 UTC) #5
Scott Hess - ex-Googler
https://codereview.chromium.org/1145833002/diff/40001/sql/connection_unittest.cc File sql/connection_unittest.cc (right): https://codereview.chromium.org/1145833002/diff/40001/sql/connection_unittest.cc#newcode1143 sql/connection_unittest.cc:1143: ASSERT_TRUE(db().OpenInMemory()); On 2015/05/22 08:48:23, rmcilroy wrote: > On 2015/05/21 ...
5 years, 7 months ago (2015-05-22 21:22:14 UTC) #6
rmcilroy
lgtm, thanks! https://codereview.chromium.org/1145833002/diff/80001/sql/connection_unittest.cc File sql/connection_unittest.cc (right): https://codereview.chromium.org/1145833002/diff/80001/sql/connection_unittest.cc#newcode1214 sql/connection_unittest.cc:1214: EXPECT_TRUE(db().Execute("SELECT milliadjust(10)")); nit - I would prefer ...
5 years, 7 months ago (2015-05-26 10:06:25 UTC) #7
Scott Hess - ex-Googler
https://codereview.chromium.org/1145833002/diff/80001/sql/connection_unittest.cc File sql/connection_unittest.cc (right): https://codereview.chromium.org/1145833002/diff/80001/sql/connection_unittest.cc#newcode1214 sql/connection_unittest.cc:1214: EXPECT_TRUE(db().Execute("SELECT milliadjust(10)")); On 2015/05/26 10:06:25, rmcilroy wrote: > nit ...
5 years, 6 months ago (2015-05-29 20:17:08 UTC) #8
rmcilroy
https://codereview.chromium.org/1145833002/diff/80001/sql/connection_unittest.cc File sql/connection_unittest.cc (right): https://codereview.chromium.org/1145833002/diff/80001/sql/connection_unittest.cc#newcode1214 sql/connection_unittest.cc:1214: EXPECT_TRUE(db().Execute("SELECT milliadjust(10)")); On 2015/05/29 20:17:08, Scott Hess wrote: > ...
5 years, 6 months ago (2015-05-29 20:30:17 UTC) #9
Scott Hess - ex-Googler
+michaneln for database_tracker.cc (minor reorder of sql::Connection calls) +asvitkine for histograms.xml. Thanks... https://codereview.chromium.org/1145833002/diff/80001/sql/connection_unittest.cc File sql/connection_unittest.cc ...
5 years, 6 months ago (2015-05-29 21:55:09 UTC) #11
michaeln
database_tracker.cc lgtm
5 years, 6 months ago (2015-06-01 22:25:26 UTC) #12
Scott Hess - ex-Googler
Sorry, merely saying "+askvitkine for histograms.xml" doesn't actually add to the reviewers list. Trying again...
5 years, 6 months ago (2015-06-02 20:59:01 UTC) #14
Alexei Svitkine (slow)
LGTM % nits https://codereview.chromium.org/1145833002/diff/100001/sql/connection.h File sql/connection.h (right): https://codereview.chromium.org/1145833002/diff/100001/sql/connection.h#newcode174 sql/connection.h:174: // Track various API calls and ...
5 years, 6 months ago (2015-06-02 21:29:51 UTC) #16
Scott Hess - ex-Googler
Thanks much. https://codereview.chromium.org/1145833002/diff/100001/sql/connection.h File sql/connection.h (right): https://codereview.chromium.org/1145833002/diff/100001/sql/connection.h#newcode174 sql/connection.h:174: // Track various API calls and results. ...
5 years, 6 months ago (2015-06-02 22:13:44 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1145833002/120001
5 years, 6 months ago (2015-06-02 22:14:49 UTC) #20
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 6 months ago (2015-06-03 00:19:42 UTC) #21
commit-bot: I haz the power
5 years, 6 months ago (2015-06-03 00:20:31 UTC) #22
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/58b8df8572e25ff91b3073213651aed4ebd675b5
Cr-Commit-Position: refs/heads/master@{#332503}

Powered by Google App Engine
This is Rietveld 408576698