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

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: Fixes. 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
Index: sql/connection_unittest.cc
diff --git a/sql/connection_unittest.cc b/sql/connection_unittest.cc
index 10a15a868908965d893ce4952388bd09688e4e19..56e311f1e2ef8d58f19215c53cac601525ec4eef 100644
--- a/sql/connection_unittest.cc
+++ b/sql/connection_unittest.cc
@@ -9,6 +9,7 @@
#include "base/logging.h"
#include "base/metrics/statistics_recorder.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"
@@ -1298,4 +1299,12 @@ TEST_F(SQLConnectionTest, TimeUpdateTransaction) {
EXPECT_EQ(0, samples->sum());
}
+TEST_F(SQLConnectionTest, OnMemoryDump) {
+ base::trace_event::ProcessMemoryDump pmd(nullptr);
+ base::trace_event::MemoryDumpArgs args = {
+ base::trace_event::MemoryDumpArgs::LevelOfDetail::HIGH};
+ ASSERT_TRUE(db().OnMemoryDump(args, &pmd));
+ EXPECT_GE(pmd.allocator_dumps().size(), 1u);
+}
+
} // namespace

Powered by Google App Engine
This is Rietveld 408576698