summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/indexupdatetests.cpp
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@10gen.com>2016-04-05 09:33:23 -0400
committerJames Wahlin <james.wahlin@10gen.com>2016-04-21 11:45:40 -0400
commit6bbaee174447ee1c9177c72bdd07f050ab07e901 (patch)
tree213a1b76b23f31c143fb8ac4f3299fb1e13fc8a9 /src/mongo/dbtests/indexupdatetests.cpp
parent223c2a1aa5fd11fd3e7115ca9acb6d1217f80f92 (diff)
downloadmongo-6bbaee174447ee1c9177c72bdd07f050ab07e901.tar.gz
SERVER-23271 Add keysInserted and keysDeleted metrics for CRUD ops
Diffstat (limited to 'src/mongo/dbtests/indexupdatetests.cpp')
-rw-r--r--src/mongo/dbtests/indexupdatetests.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/mongo/dbtests/indexupdatetests.cpp b/src/mongo/dbtests/indexupdatetests.cpp
index e81c45bdd94..3b3c3531ec9 100644
--- a/src/mongo/dbtests/indexupdatetests.cpp
+++ b/src/mongo/dbtests/indexupdatetests.cpp
@@ -351,13 +351,16 @@ public:
db->dropCollection(&_txn, _ns);
coll = db->createCollection(&_txn, _ns);
+ OpDebug* const nullOpDebug = nullptr;
coll->insertDocument(&_txn,
BSON("_id" << 1 << "a"
<< "dup"),
+ nullOpDebug,
true);
coll->insertDocument(&_txn,
BSON("_id" << 2 << "a"
<< "dup"),
+ nullOpDebug,
true);
wunit.commit();
}
@@ -394,13 +397,16 @@ public:
db->dropCollection(&_txn, _ns);
coll = db->createCollection(&_txn, _ns);
+ OpDebug* const nullOpDebug = nullptr;
coll->insertDocument(&_txn,
BSON("_id" << 1 << "a"
<< "dup"),
+ nullOpDebug,
true);
coll->insertDocument(&_txn,
BSON("_id" << 2 << "a"
<< "dup"),
+ nullOpDebug,
true);
wunit.commit();
}
@@ -436,13 +442,16 @@ public:
db->dropCollection(&_txn, _ns);
coll = db->createCollection(&_txn, _ns);
+ OpDebug* const nullOpDebug = nullptr;
ASSERT_OK(coll->insertDocument(&_txn,
BSON("_id" << 1 << "a"
<< "dup"),
+ nullOpDebug,
true));
ASSERT_OK(coll->insertDocument(&_txn,
BSON("_id" << 2 << "a"
<< "dup"),
+ nullOpDebug,
true));
wunit.commit();
}
@@ -488,8 +497,9 @@ public:
coll->getIndexCatalog()->dropAllIndexes(&_txn, true);
// Insert some documents with enforceQuota=true.
int32_t nDocs = 1000;
+ OpDebug* const nullOpDebug = nullptr;
for (int32_t i = 0; i < nDocs; ++i) {
- coll->insertDocument(&_txn, BSON("a" << i), true);
+ coll->insertDocument(&_txn, BSON("a" << i), nullOpDebug, true);
}
wunit.commit();
}
@@ -520,8 +530,9 @@ public:
coll->getIndexCatalog()->dropAllIndexes(&_txn, true);
// Insert some documents.
int32_t nDocs = 1000;
+ OpDebug* const nullOpDebug = nullptr;
for (int32_t i = 0; i < nDocs; ++i) {
- coll->insertDocument(&_txn, BSON("a" << i), true);
+ coll->insertDocument(&_txn, BSON("a" << i), nullOpDebug, true);
}
wunit.commit();
}
@@ -555,8 +566,9 @@ public:
coll->getIndexCatalog()->dropAllIndexes(&_txn, true);
// Insert some documents.
int32_t nDocs = 1000;
+ OpDebug* const nullOpDebug = nullptr;
for (int32_t i = 0; i < nDocs; ++i) {
- coll->insertDocument(&_txn, BSON("_id" << i), true);
+ coll->insertDocument(&_txn, BSON("_id" << i), nullOpDebug, true);
}
wunit.commit();
}
@@ -590,8 +602,9 @@ public:
coll->getIndexCatalog()->dropAllIndexes(&_txn, true);
// Insert some documents.
int32_t nDocs = 1000;
+ OpDebug* const nullOpDebug = nullptr;
for (int32_t i = 0; i < nDocs; ++i) {
- coll->insertDocument(&_txn, BSON("_id" << i), true);
+ coll->insertDocument(&_txn, BSON("_id" << i), nullOpDebug, true);
}
wunit.commit();
}