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

Unified Diff: content/browser/indexed_db/database_impl.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/database_impl.cc
diff --git a/content/browser/indexed_db/database_impl.cc b/content/browser/indexed_db/database_impl.cc
index 191b0db0b91108b80c7124cf00568bafd64feca8..a9ebc60e5740d75afb41e5b7a43a079c705abdd7 100644
--- a/content/browser/indexed_db/database_impl.cc
+++ b/content/browser/indexed_db/database_impl.cc
@@ -661,7 +661,10 @@ void DatabaseImpl::IDBThreadHelper::Put(
if (!transaction)
return;
- uint64_t commit_size = mojo_value->bits.size();
+ // Value size recorded in IDBObjectStore before we can auto-wrap in a blob.
+ UMA_HISTOGRAM_MEMORY_KB("WebCore.IndexedDB.PutKeySize", key.size_estimate());
+
+ uint64_t commit_size = mojo_value->bits.size() + key.size_estimate();
IndexedDBValue value;
swap(value.bits, mojo_value->bits);
swap(value.blob_info, blob_info);

Powered by Google App Engine
This is Rietveld 408576698