cvs: phpdoc /en/reference/mysqli mysqlnd.xml
| From: | Anthony Bedford | Date: | Thu, 12 Feb 2009 11:48:34 +0000 |
| Subject: | cvs: phpdoc /en/reference/mysqli mysqlnd.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-3222@lists.php.net to get a copy of this message | ||
abedford Thu Feb 12 11:48:34 2009 UTC
Modified files:
/phpdoc/en/reference/mysqli mysqlnd.xml
Log:
First attempt at documenting statistical functions provided
by mysqlnd, and accessed from mysqli.
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/mysqli/mysqlnd.xml?r1=1.1&r2=1.2&diff_format=u
Index: phpdoc/en/reference/mysqli/mysqlnd.xml
diff -u phpdoc/en/reference/mysqli/mysqlnd.xml:1.1 phpdoc/en/reference/mysqli/mysqlnd.xml:1.2
--- phpdoc/en/reference/mysqli/mysqlnd.xml:1.1 Wed Feb 11 16:52:44 2009
+++ phpdoc/en/reference/mysqli/mysqlnd.xml Thu Feb 12 11:48:34 2009
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<chapter xml:id="mysqli.mysqlnd" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>The MySQL Native Driver</title>
@@ -122,9 +122,9 @@
<listitem>
<para>
Performance statistics calls:
- <literal>mysqli_get_cache_stats()</literal>,
- <literal>mysqli_get_client_stats()</literal>,
- <literal>mysqli_get_connection_stats()</literal>
+ <function>mysqli_get_cache_stats</function>,
+ <function>mysqli_get_client_stats</function>,
+ <function>mysqli_get_connection_stats</function>
</para>
</listitem>
@@ -220,7 +220,119 @@
for processing.
</para>
-<!-- Stats to do -->
+ <para>
+ <emphasis role="bold">Using Statistical Data</emphasis>
+ </para>
+
+ <para>
+ MySQL Native Driver contains support for gathering statistics on the
+ communication between the client and the server. The statistics
+ gathered are of three main types:
+ </para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ Client statistics
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Connection statistics
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Zval cache statistics
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
+ <para>
+ If you are using the <literal>mysqli</literal> extension,
+ these statistics can be obtained through three API calls:
+ </para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>
+ <function>mysqli_get_client_stats</function>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <function>mysqli_get_connection_stats</function>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <function>mysqli_get_cache_stats</function>
+ </para>
+ </listitem>
+
+ </itemizedlist>
+
+ <para>
+ <emphasis role="bold">Accessing Client Statistics</emphasis>
+ </para>
+
+ <para>
+ To access client statistics, you need to call
+ <function>mysqli_get_client_stats</function>. The function call does
+ not require any parameters.
+ </para>
+
+ <para>
+ The function returns an associative array that contains the name of
+ the statistic as the key and the statistical data as the value.
+ </para>
+
+ <para>
+ Client statistics can also be accessed by calling the
+ <function>phpinfo</function> function.
+ </para>
+
+<!-- [Table of client statistics] -->
+
+ <para>
+ <emphasis role="bold">Accessing Connection Statistics</emphasis>
+ </para>
+
+ <para>
+ To access connection statistics call
+ <function>mysqli_get_connection_stats</function>. This takes the
+ database connection handle as the parameter.
+ </para>
+
+ <para>
+ The function returns an associative array that contains the name of
+ the statistic as the key and the statistical data as the value.
+ </para>
+
+<!-- [Table of connection statistics] -->
+
+ <para>
+ <emphasis role="bold">Accessing Zval Cache Statistics</emphasis>
+ </para>
+
+ <para>
+ The MySQL Native Driver also collects statistics from its internal
+ Zval cache. These statistics can be accessed by calling
+ <function>mysqli_get_cache_stat</function>.
+ </para>
+
+ <para>
+ The Zval cache statistics obtained may lead to a tweaking of
+ <filename>php.ini</filename> settings related to the Zval cache,
+ resulting in better performance.
+ </para>
</chapter>
<!-- Keep this comment at the end of the file