略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: MongoDB::getProfilingLevel

2024-05-05

MongoDB::getProfilingLevel

(PECL mongo >=0.9.0)

MongoDB::getProfilingLevelGets this database's profiling level

说明

public MongoDB::getProfilingLevel ( void ) : int

This returns the current database profiling level.

The database profiler tracks query execution times. If you turn it on (say, using MongoDB::setProfilingLevel() or the shell), you can see how many queries took longer than a given number of milliseconds or the timing for all queries.

Note that profiling slows down queries, so it is better to use in development or testing than in a time-sensitive application.

This function is equivalent to running:

<?php

public function getProfilingLevel() {
    return 
$this->command(array('profile' => -1));
}

?>

参数

此函数没有参数。

返回值

Returns the profiling level.

参见

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/mongodb.getprofilinglevel.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3