From 4260a74dbdbbe7ece95a5ab4fb8460370eef915a Mon Sep 17 00:00:00 2001 From: dwight Date: Sun, 26 Dec 2010 10:37:37 -0500 Subject: add a test --- dbtests/perftests.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'dbtests/perftests.cpp') 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 >(); add< Update1 >(); add< MoreIndexes >(); + add< InsertBig >(); } } myall; } -- cgit v1.2.1