summaryrefslogtreecommitdiff
path: root/dbtests/perftests.cpp
diff options
context:
space:
mode:
authordwight <dwight@10gen.com>2010-12-26 10:37:37 -0500
committerdwight <dwight@10gen.com>2010-12-26 10:37:37 -0500
commit4260a74dbdbbe7ece95a5ab4fb8460370eef915a (patch)
tree654faa34ce90bf7370ed355a3d2a1e5401e60619 /dbtests/perftests.cpp
parent3f725fdc083e30df3eed4c5ac43b8d83a99bb9f0 (diff)
downloadmongo-4260a74dbdbbe7ece95a5ab4fb8460370eef915a.tar.gz
add a test
Diffstat (limited to 'dbtests/perftests.cpp')
-rw-r--r--dbtests/perftests.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/dbtests/perftests.cpp b/dbtests/perftests.cpp
index 1b82b4dd984..11d497d9115 100644
--- a/dbtests/perftests.cpp
+++ b/dbtests/perftests.cpp
@@ -190,6 +190,23 @@ namespace PerfTests {
unsigned long long expectation() { return 1000; }
};
+ class InsertBig : public InsertDup {
+ BSONObj x;
+ public:
+ InsertBig() {
+ char buf[200000];
+ BSONObjBuilder b;
+ b.append("x", 99);
+ b.appendBinData("bin", 200000, (BinDataType) 129, buf);
+ x = b.obj();
+ }
+ string name() { return "insert big"; }
+ void timed() {
+ client().insert( ns(), x );
+ }
+ unsigned long long expectation() { return 20; }
+ };
+
class InsertRandom : public B {
public:
string name() { return "random inserts"; }
@@ -267,6 +284,7 @@ namespace PerfTests {
add< MoreIndexes<InsertRandom> >();
add< Update1 >();
add< MoreIndexes<Update1> >();
+ add< InsertBig >();
}
} myall;
}