summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2015-06-19 13:12:27 -0400
committerRamon Fernandez <ramon@mongodb.com>2015-06-19 18:15:12 -0400
commit5749faa717e53a6929a6a2443c8bff7887a31f38 (patch)
tree7640d3f1aa361425388b4bf024b3b26ea702ed2b
parent7dda25f31192f0f4847e0d13568229ea6132981e (diff)
downloadmongo-5749faa717e53a6929a6a2443c8bff7887a31f38.tar.gz
SERVER-19054: Don't log background tasks taking less than 100ms
(cherry picked from commit d09fdf2b5887bfd6773f1a6da374a1ff7fc0e242)
-rw-r--r--src/mongo/util/background.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/util/background.cpp b/src/mongo/util/background.cpp
index 090b665ddd4..ec741340b89 100644
--- a/src/mongo/util/background.cpp
+++ b/src/mongo/util/background.cpp
@@ -367,7 +367,8 @@ namespace mongo {
}
const int ms = timer.millis();
- LOG( ms <= 3 ? 3 : 0 ) << "task: " << taskName << " took: " << ms << "ms" << endl;
+ const int kMinLogMs = 100;
+ LOG( ms <= kMinLogMs ? 3 : 0 ) << "task: " << taskName << " took: " << ms << "ms" << endl;
}
} // namespace mongo