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

Unified Diff: content/browser/indexed_db/indexed_db_transaction.cc

Issue 2904603003: [IndexedDB] Adding txn, value, and key size metrics (Closed)
Patch Set: Created 3 years, 7 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: content/browser/indexed_db/indexed_db_transaction.cc
diff --git a/content/browser/indexed_db/indexed_db_transaction.cc b/content/browser/indexed_db/indexed_db_transaction.cc
index 904a284651a5220be85d53d13c6958292ac8756c..6e104bba59e8302ecda615e0a0cf12e289b45325 100644
--- a/content/browser/indexed_db/indexed_db_transaction.cc
+++ b/content/browser/indexed_db/indexed_db_transaction.cc
@@ -8,6 +8,7 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
+#include "base/metrics/histogram_macros.h"
#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -336,6 +337,9 @@ leveldb::Status IndexedDBTransaction::CommitPhaseTwo() {
state_ = FINISHED;
+ UMA_HISTOGRAM_MEMORY_KB("WebCore.IndexedDB.Transaction.SizeOnCommit",
+ transaction_->transaction()->GetTransactionSize());
+
leveldb::Status s;
bool committed;
if (!used_) {
@@ -350,6 +354,8 @@ leveldb::Status IndexedDBTransaction::CommitPhaseTwo() {
// release references and allow the backing store itself to be
// released, and order is critical.
CloseOpenCursors();
+ UMA_HISTOGRAM_MEMORY_KB("WebCore.IndexedDB.TransactionSize",
pwnall 2017/05/23 23:01:09 Is this number different because of the blob journ
dmurph 2017/05/24 02:01:58 Had this wrong - put in right spot now, with comme
+ transaction_->transaction()->GetTransactionSize());
transaction_->Reset();
// Transactions must also be marked as completed before the

Powered by Google App Engine
This is Rietveld 408576698