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

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

Issue 1238393003: [IndexedDB] Adding traces, perf tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forgot to start the old test Created 5 years, 3 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
« no previous file with comments | « content/browser/indexed_db/indexed_db_callbacks.cc ('k') | content/browser/indexed_db/indexed_db_tracing.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_database.cc
diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc
index 31d0e69224510ec3b28d2178b911f81455e67225..5334541c20a72723aa70fa51694f2cabfdd1efe6 100644
--- a/content/browser/indexed_db/indexed_db_database.cc
+++ b/content/browser/indexed_db/indexed_db_database.cc
@@ -1066,19 +1066,22 @@ void IndexedDBDatabase::PutOperation(scoped_ptr<PutOperationParams> params,
error);
return;
}
-
- for (size_t i = 0; i < index_writers.size(); ++i) {
- IndexWriter* index_writer = index_writers[i];
- index_writer->WriteIndexKeys(record_identifier,
- backing_store_.get(),
- transaction->BackingStoreTransaction(),
- id(),
- params->object_store_id);
+ {
+ IDB_TRACE1("IndexedDBDatabase::PutOperation.UpdateIndexes", "txn.id",
+ transaction->id());
+ for (size_t i = 0; i < index_writers.size(); ++i) {
+ IndexWriter* index_writer = index_writers[i];
+ index_writer->WriteIndexKeys(record_identifier, backing_store_.get(),
+ transaction->BackingStoreTransaction(), id(),
+ params->object_store_id);
+ }
}
if (object_store.auto_increment &&
params->put_mode != blink::WebIDBPutModeCursorUpdate &&
key->type() == WebIDBKeyTypeNumber) {
+ IDB_TRACE1("IndexedDBDatabase::PutOperation.AutoIncrement", "txn.id",
+ transaction->id());
leveldb::Status s = UpdateKeyGenerator(backing_store_.get(),
transaction,
id(),
@@ -1095,8 +1098,11 @@ void IndexedDBDatabase::PutOperation(scoped_ptr<PutOperationParams> params,
return;
}
}
-
- params->callbacks->OnSuccess(*key);
+ {
+ IDB_TRACE1("IndexedDBDatabase::PutOperation.Callbacks", "txn.id",
+ transaction->id());
+ params->callbacks->OnSuccess(*key);
+ }
}
void IndexedDBDatabase::SetIndexKeys(int64 transaction_id,
@@ -1178,7 +1184,6 @@ void IndexedDBDatabase::SetIndexKeys(int64 transaction_id,
void IndexedDBDatabase::SetIndexesReady(int64 transaction_id,
int64,
const std::vector<int64>& index_ids) {
- IDB_TRACE1("IndexedDBDatabase::SetIndexesReady", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -1194,9 +1199,6 @@ void IndexedDBDatabase::SetIndexesReady(int64 transaction_id,
void IndexedDBDatabase::SetIndexesReadyOperation(
size_t index_count,
IndexedDBTransaction* transaction) {
- IDB_TRACE1("IndexedDBDatabase::SetIndexesReadyOperation",
- "txn.id",
- transaction->id());
for (size_t i = 0; i < index_count; ++i)
transaction->DidCompletePreemptiveEvent();
}
@@ -1555,6 +1557,7 @@ void IndexedDBDatabase::VersionChangeOperation(
void IndexedDBDatabase::TransactionFinished(IndexedDBTransaction* transaction,
bool committed) {
+ IDB_TRACE1("IndexedDBTransaction::TransactionFinished", "txn.id", id());
DCHECK(transactions_.find(transaction->id()) != transactions_.end());
DCHECK_EQ(transactions_[transaction->id()], transaction);
transactions_.erase(transaction->id());
« no previous file with comments | « content/browser/indexed_db/indexed_db_callbacks.cc ('k') | content/browser/indexed_db/indexed_db_tracing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698