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

Unified Diff: sql/connection_unittest.cc

Issue 1327063002: [tracing] Add sqlite memory statistics to tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 2 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
« sql/connection.cc ('K') | « sql/connection.cc ('k') | sql/sql.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/connection_unittest.cc
diff --git a/sql/connection_unittest.cc b/sql/connection_unittest.cc
index 0038a1d7f57aac2f8b2f692c6ed17eae44a5ee8c..d933a6dab6e6d7cb9a3aca7c88a5d6e26f17daba 100644
--- a/sql/connection_unittest.cc
+++ b/sql/connection_unittest.cc
@@ -11,6 +11,7 @@
#include "base/metrics/statistics_recorder.h"
#include "base/strings/stringprintf.h"
#include "base/test/histogram_tester.h"
+#include "base/trace_event/process_memory_dump.h"
#include "sql/connection.h"
#include "sql/correct_sql_test_base.h"
#include "sql/meta_table.h"
@@ -1378,4 +1379,12 @@ TEST_F(SQLConnectionTest, MmapTest) {
}
#endif
+TEST_F(SQLConnectionTest, OnMemoryDump) {
+ base::trace_event::ProcessMemoryDump pmd(nullptr);
+ base::trace_event::MemoryDumpArgs args = {
+ base::trace_event::MemoryDumpLevelOfDetail::DETAILED};
+ ASSERT_TRUE(db().OnMemoryDump(args, &pmd));
+ EXPECT_GE(pmd.allocator_dumps().size(), 1u);
+}
+
} // namespace
« sql/connection.cc ('K') | « sql/connection.cc ('k') | sql/sql.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698