summaryrefslogtreecommitdiff
path: root/src/mongo/client/examples
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/client/examples')
-rw-r--r--src/mongo/client/examples/mongoperf.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/client/examples/mongoperf.cpp b/src/mongo/client/examples/mongoperf.cpp
index 04f83044955..80f43ae815d 100644
--- a/src/mongo/client/examples/mongoperf.cpp
+++ b/src/mongo/client/examples/mongoperf.cpp
@@ -173,11 +173,11 @@ void go() {
recSizeKB = 4;
verify(recSizeKB <= 64000 && recSizeKB > 0);
- auto txn = cc().makeOperationContext();
- MemoryMappedFile f(txn.get());
- ON_BLOCK_EXIT([&f, &txn] {
- LockMongoFilesExclusive lock(txn.get());
- f.close(txn.get());
+ auto opCtx = cc().makeOperationContext();
+ MemoryMappedFile f(opCtx.get());
+ ON_BLOCK_EXIT([&f, &opCtx] {
+ LockMongoFilesExclusive lock(opCtx.get());
+ f.close(opCtx.get());
});
cout << "creating test file size:";
@@ -216,8 +216,8 @@ void go() {
if (o["mmf"].trueValue()) {
delete lf;
lf = 0;
- mmfFile = new MemoryMappedFile(txn.get());
- mmf = (char*)mmfFile->map(txn.get(), fname);
+ mmfFile = new MemoryMappedFile(opCtx.get());
+ mmf = (char*)mmfFile->map(opCtx.get(), fname);
verify(mmf);
syncDelaySecs = options["syncDelay"].numberInt();