summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/perftests.cpp
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2017-03-07 12:00:08 -0500
committerMaria van Keulen <maria@mongodb.com>2017-03-07 12:00:08 -0500
commit589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79 (patch)
treec7a090ffdd56a91ae677e2492c61b820af44f964 /src/mongo/dbtests/perftests.cpp
parent3cba97198638df3750e3b455e2ad57af7ee536ae (diff)
downloadmongo-589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79.tar.gz
SERVER-27938 Rename all OperationContext variables to opCtx
This commit is an automated rename of all whole word instances of txn, _txn, and txnPtr to opCtx, _opCtx, and opCtxPtr, respectively in all .cpp and .h files in src/mongo.
Diffstat (limited to 'src/mongo/dbtests/perftests.cpp')
-rw-r--r--src/mongo/dbtests/perftests.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mongo/dbtests/perftests.cpp b/src/mongo/dbtests/perftests.cpp
index 8c761037950..042b3629b5d 100644
--- a/src/mongo/dbtests/perftests.cpp
+++ b/src/mongo/dbtests/perftests.cpp
@@ -82,11 +82,11 @@ const bool profiling = false;
class ClientBase {
public:
- ClientBase() : _client(&_txn) {
- mongo::LastError::get(_txn.getClient()).reset();
+ ClientBase() : _client(&_opCtx) {
+ mongo::LastError::get(_opCtx.getClient()).reset();
}
virtual ~ClientBase() {
- mongo::LastError::get(_txn.getClient()).reset();
+ mongo::LastError::get(_opCtx.getClient()).reset();
}
protected:
@@ -103,13 +103,13 @@ protected:
DBClientBase* client() {
return &_client;
}
- OperationContext* txn() {
- return &_txn;
+ OperationContext* opCtx() {
+ return &_opCtx;
}
private:
const ServiceContext::UniqueOperationContext _txnPtr = cc().makeOperationContext();
- OperationContext& _txn = *_txnPtr;
+ OperationContext& _opCtx = *_txnPtr;
DBDirectClient _client;
};
@@ -332,9 +332,9 @@ public:
srand(++z ^ (unsigned)time(0));
#endif
Client::initThreadIfNotAlready("perftestthr");
- const ServiceContext::UniqueOperationContext txnPtr = cc().makeOperationContext();
- OperationContext& txn = *txnPtr;
- DBDirectClient c(&txn);
+ const ServiceContext::UniqueOperationContext opCtxPtr = cc().makeOperationContext();
+ OperationContext& opCtx = *opCtxPtr;
+ DBDirectClient c(&opCtx);
const unsigned int Batch = batchSize();
prepThreaded();