diff --git a/source/tutorial/manage-the-database-profiler.txt b/source/tutorial/manage-the-database-profiler.txt index ce89f48284f..bbb65689c54 100644 --- a/source/tutorial/manage-the-database-profiler.txt +++ b/source/tutorial/manage-the-database-profiler.txt @@ -122,8 +122,8 @@ Profile a Random Sample of Slow Operations .. versionadded:: 3.6 -To profile only a randomly sampled subset of all *slow* operations on a -specific database, specify the desired sample rate in one of the following ways: +To profile only a randomly sampled subset of all *slow* operations, specify the +desired sample rate in one of the following ways: - Set the value of ``sampleRate`` using the :dbcommand:`profile` command or :method:`db.setProfilingLevel()` shell helper method. @@ -135,9 +135,9 @@ specific database, specify the desired sample rate in one of the following ways: :ref:`configuration file `. By default, ``sampleRate`` is set to ``1.0``, meaning all *slow* -operations are profiled. Databases with a ``sampleRate`` between 0 and 1 -will only profile a randomly sampled percentage of *slow* operations -according to ``sampleRate``. +operations are profiled. When ``sampleRate`` is set between 0 and 1 +databases with profiling level ``1`` will only profile a randomly sampled +percentage of *slow* operations according to ``sampleRate``. For example, the following method sets the profiling level for the current database to ``1`` and sets the profiler to sample 42% of all *slow* operations: @@ -146,6 +146,11 @@ current database to ``1`` and sets the profiler to sample 42% of all *slow* oper db.setProfilingLevel(1, { sampleRate: 0.42 }) +.. important:: + The sample rate value applies to all databases in a + :binary:`~bin.mongod` instance. It is used by both the database profiler + and the system log + .. important:: .. include:: /includes/fact-log-slow-queries.rst