Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 9478

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Gets this database's profiling level</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mongodb.getgridfs.html">MongoDB::getGridFS</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongodb.getreadpreference.html">MongoDB::getReadPreference</a></div>
 <div class="up"><a href="class.mongodb.html">MongoDB</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="mongodb.getprofilinglevel" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoDB::getProfilingLevel</h1>
  <p class="verinfo">(PECL mongo &gt;=0.9.0)</p><p class="refpurpose"><span class="refname">MongoDB::getProfilingLevel</span> &mdash; <span class="dc-title">Gets this database&#039;s profiling level</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mongodb.getprofilinglevel-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span> <span class="methodname"><strong>MongoDB::getProfilingLevel</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   This returns the current database profiling level.
  </p>
  <p class="para">
   The database profiler tracks query execution times.  If you turn it on (say,
   using  <span class="function"><a href="mongodb.setprofilinglevel.html" class="function">MongoDB::setProfilingLevel()</a></span> or the shell), you can
   see how many queries took longer than a given number of milliseconds or the
   timing for all queries.
  </p>
  <p class="para">
   Note that profiling slows down queries, so it is better to use in development
   or testing than in a time-sensitive application.
  </p>
  <p class="para">
   This function is equivalent to running:
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">public&nbsp;function&nbsp;</span><span style="color: #0000BB">getProfilingLevel</span><span style="color: #007700">()&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">command</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'profile'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">));<br />}<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mongodb.getprofilinglevel-parameters">
  <h3 class="title">Parameters</h3>  
  <p class="para">This function has no parameters.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongodb.getprofilinglevel-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the profiling level.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-mongodb.getprofilinglevel-seealso">
  <h3 class="title">See Also</h3>
  <ul class="simplelist">
   <li class="member">MongoDB core docs on <a href="http://docs.mongodb.org/manual/tutorial/manage-the-database-profiler/" class="link external">&raquo;&nbsp;profiling</a></li>
   <li class="member"> <span class="methodname"><a href="mongodb.setprofilinglevel.html" class="methodname" rel="rdfs-seeAlso">MongoDB::setProfilingLevel()</a> - Sets this database's profiling level</span></li>
  </ul>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mongodb.getgridfs.html">MongoDB::getGridFS</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongodb.getreadpreference.html">MongoDB::getReadPreference</a></div>
 <div class="up"><a href="class.mongodb.html">MongoDB</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>