/// <summary>
        /// Sets the level of profile information to write.
        /// </summary>
        /// <param name="level">The profiling level.</param>
        /// <param name="slow">The threshold that defines a slow query.</param>
        /// <returns>A CommandResult.</returns>
        public virtual CommandResult SetProfilingLevel(ProfilingLevel level, TimeSpan slow)
        {
            var command = new CommandDocument
            {
                { "profile", (int)level },
                { "slowms", slow.TotalMilliseconds, slow != TimeSpan.Zero } // optional
            };

            return(RunCommandAs <CommandResult>(command, ReadPreference.Primary));
        }
 public CommandResult SetProfilingLevel(ProfilingLevel level, TimeSpan slow)
 {
     return(_mongoDatabase.SetProfilingLevel(level, slow));
 }
 /// <summary>
 /// Sets the level of profile information to write.
 /// </summary>
 /// <param name="level">The profiling level.</param>
 /// <returns>A CommandResult.</returns>
 public virtual CommandResult SetProfilingLevel(ProfilingLevel level)
 {
     return(SetProfilingLevel(level, TimeSpan.Zero));
 }
 public CommandResult SetProfilingLevel(ProfilingLevel level)
 {
     return(_mongoDatabase.SetProfilingLevel(level));
 }