Try to make MongoMutexTest faster in _DEBUG builds

This commit is contained in:
Mathias Stearn
2011-04-19 14:16:44 -04:00
parent d7d2ce01f5
commit e2ff53f693

View File

@@ -68,6 +68,14 @@ namespace ThreadedTests {
public:
MongoMutexTest() : pm(N * nthreads) {}
void run() {
DEV {
// in _DEBUG builds on linux we mprotect each time a writelock
// is taken. That can greatly slow down this test if there are
// many open files
DBDirectClient db;
db.simpleCommand("admin", NULL, "closeAllDatabases");
}
Timer t;
cout << "MongoMutexTest N:" << N << endl;
ThreadedTest<135>::run();