svn: /phpdoc/ru/trunk/reference/ ffi/ffi/load.xml ffi/ffi/scope.xml info/functions/gc-status.xml xhprof/functions/xhprof-disable.xml xhprof/functions/xhprof-enable.xml xhprof/functions/xhprof-sample-disable.xml xhprof/functions/xhprof-sample-enable.xml
[email protected] (Andrey Gromov)
| Newsgroups | php.doc.ru |
|---|---|
| Message-ID | <[email protected]> |
rjhdby Sat, 25 Jan 2020 08:15:47 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=349009
Log:
upd, new
Changed paths:
U phpdoc/ru/trunk/reference/ffi/ffi/load.xml
U phpdoc/ru/trunk/reference/ffi/ffi/scope.xml
A phpdoc/ru/trunk/reference/info/functions/gc-status.xml
A phpdoc/ru/trunk/reference/xhprof/functions/xhprof-disable.xml
A phpdoc/ru/trunk/reference/xhprof/functions/xhprof-enable.xml
A phpdoc/ru/trunk/reference/xhprof/functions/xhprof-sample-disable.xml
A phpdoc/ru/trunk/reference/xhprof/functions/xhprof-sample-enable.xml
svn-diffs-349009.txt
(text/x-diff, 20 KB)
Modified: phpdoc/ru/trunk/reference/ffi/ffi/load.xml
===================================================================
--- phpdoc/ru/trunk/reference/ffi/ffi/load.xml 2020-01-25 08:15:12 UTC (rev 349008)
+++ phpdoc/ru/trunk/reference/ffi/ffi/load.xml 2020-01-25 08:15:47 UTC (rev 349009)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 347385 Maintainer: rjhdby Status: ready -->
+<!-- EN-Revision: 349001 Maintainer: rjhdby Status: ready -->
<!-- Reviewed: yes Maintainer: sergey -->
<refentry xml:id="ffi.load" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -51,6 +51,15 @@
</para>
</refsect1>
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><methodname>FFI::scope</methodname></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
Modified: phpdoc/ru/trunk/reference/ffi/ffi/scope.xml
===================================================================
--- phpdoc/ru/trunk/reference/ffi/ffi/scope.xml 2020-01-25 08:15:12 UTC (rev 349008)
+++ phpdoc/ru/trunk/reference/ffi/ffi/scope.xml 2020-01-25 08:15:47 UTC (rev 349009)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 347385 Maintainer: rjhdby Status: ready -->
+<!-- EN-Revision: 349002 Maintainer: rjhdby Status: ready -->
<!-- Reviewed: yes Maintainer: sergey -->
<refentry xml:id="ffi.scope" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -20,6 +20,12 @@
Инстанциирует объект FFI в соответствии с декларацией
С, разобранной на этапе предзагрузки.
</para>
+ <para>
+ Метод <methodname>FFI::scope</methodname> можно
+ многократно вызывать для одного и того же контекста.
+ Множестно ссылок на один и тот же контекст могут быть
+ загружены одновременно.
+ </para>
</refsect1>
<refsect1 role="parameters">
@@ -44,6 +50,15 @@
</para>
</refsect1>
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><methodname>FFI::load</methodname></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
Added: phpdoc/ru/trunk/reference/info/functions/gc-status.xml
===================================================================
--- phpdoc/ru/trunk/reference/info/functions/gc-status.xml (rev 0)
+++ phpdoc/ru/trunk/reference/info/functions/gc-status.xml 2020-01-25 08:15:47 UTC (rev 349009)
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 347915 Maintainer: rjhdby Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.gc-status" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+ <refname>gc_status</refname>
+ <refpurpose>Возвращает информацию о текущем статусе сборщика мусора</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>array</type><methodname>gc_status</methodname>
+ <void />
+ </methodsynopsis>
+ <para>
+ Возвращает информацию о текущем статусе сборщика мусора.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ &no.function.parameters;
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Возвращает ассоциативный массив со следующими элементами:
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <literal>"runs"</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>"collected"</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>"threshold"</literal>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>"roots"</literal>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Использование <function>gc_status</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+// создадим дерево объектов, для которых понадобится собирать мусор
+$a = new stdClass();
+$a->b = [];
+for ($i = 0; $i < 100000; $i++) {
+ $b = new stdClass();
+ $b->a = $a;
+ $a->b[] = $b;
+}
+unset($a);
+unset($b);
+gc_collect_cycles();
+
+var_dump(gc_status());
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+array(4) {
+ ["runs"]=>
+ int(5)
+ ["collected"]=>
+ int(100002)
+ ["threshold"]=>
+ int(50001)
+ ["roots"]=>
+ int(0)
+}
+]]>
+ </screen>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><link linkend="features.gc">Сбор мусора</link></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
Property changes on: phpdoc/ru/trunk/reference/info/functions/gc-status.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ru/trunk/reference/xhprof/functions/xhprof-disable.xml
===================================================================
--- phpdoc/ru/trunk/reference/xhprof/functions/xhprof-disable.xml (rev 0)
+++ phpdoc/ru/trunk/reference/xhprof/functions/xhprof-disable.xml 2020-01-25 08:15:47 UTC (rev 349009)
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 310721 Maintainer: rjhdby Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.xhprof-disable" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+ <refname>xhprof_disable</refname>
+ <refpurpose>Останавливает профилирование xhprof</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>array</type><methodname>xhprof_disable</methodname>
+ <void />
+ </methodsynopsis>
+ <para>
+ Останавливает профилирование и возвращает собранные данные.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ &no.function.parameters;
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Массив с результатами профилирования.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <example>
+ <title>Пример использования <function>xhprof_disable</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+xhprof_enable();
+
+$foo = strlen("foo bar");
+
+$xhprof_data = xhprof_disable();
+
+print_r($xhprof_data);
+?>
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+Array
+(
+ [main()==>strlen] => Array
+ (
+ [ct] => 1
+ [wt] => 279
+ )
+
+ [main()==>xhprof_disable] => Array
+ (
+ [ct] => 1
+ [wt] => 9
+ )
+
+ [main()] => Array
+ (
+ [ct] => 1
+ [wt] => 610
+ )
+
+)
+]]>
+ </screen>
+ </example>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
Property changes on: phpdoc/ru/trunk/reference/xhprof/functions/xhprof-disable.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ru/trunk/reference/xhprof/functions/xhprof-enable.xml
===================================================================
--- phpdoc/ru/trunk/reference/xhprof/functions/xhprof-enable.xml (rev 0)
+++ phpdoc/ru/trunk/reference/xhprof/functions/xhprof-enable.xml 2020-01-25 08:15:47 UTC (rev 349009)
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 311175 Maintainer: rjhdby Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.xhprof-enable" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+ <refname>xhprof_enable</refname>
+ <refpurpose>Запуск профилирования xhprof</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>void</type><methodname>xhprof_enable</methodname>
+ <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
+ <methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ Запускает профилирование.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>flags</parameter></term>
+ <listitem>
+ <para>
+ Опциональные флаги для получения дополнительной
+ информации при профилировании. Подробности можно найти в
+ разделе <link linkend="xhprof.constants">Константы XHprof</link>.
+ Например <constant>XHPROF_FLAGS_MEMORY</constant>
+ включает профилирование памяти.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>options</parameter></term>
+ <listitem>
+ <para>
+ Массив дополнительных опций <type>array</type>. А конкретно
+ опция 'ignored_functions' со списком функций, которые не нужно
+ профилировать. Это не обязательный параметр.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ &null;
+ </para>
+ </refsect1>
+
+ <refsect1 role="changelog"><!-- {{{ -->
+ &reftitle.changelog;
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>0.9.2</entry>
+ <entry>
+ Добавлен необязательный параметр <parameter>options</parameter>.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1><!-- }}} -->
+
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <example>
+ <title>Пример использования <function>xhprof_enable</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+// 1. время исполнения + память + CPU; также игнорируем функции
+стандартной библиотеки
+xhprof_enable(XHPROF_FLAGS_NO_BUILTINS | XHPROF_FLAGS_CPU | XHPROF_FLAGS_MEMORY);
+
+// 2. время исполнения; игнорируем функции ignore call_user_func*
+xhprof_enable(
+ 0,
+ array('ignored_functions' => array('call_user_func',
+ 'call_user_func_array')));
+
+// 3. время исполнения + память; игнорируем функции call_user_func*
+xhprof_enable(
+ XHPROF_FLAGS_MEMORY,
+ array('ignored_functions' => array('call_user_func',
+ 'call_user_func_array')));
+?>
+]]>
+ </programlisting>
+ </example>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <simplelist>
+ <member><function>xhprof_disable</function></member>
+ <member><function>xhprof_sample_enable</function></member>
+ <member><function>memory_get_usage</function></member>
+ <member><function>getrusage</function></member>
+ </simplelist>
+ </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
Property changes on: phpdoc/ru/trunk/reference/xhprof/functions/xhprof-enable.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ru/trunk/reference/xhprof/functions/xhprof-sample-disable.xml
===================================================================
--- phpdoc/ru/trunk/reference/xhprof/functions/xhprof-sample-disable.xml (rev 0)
+++ phpdoc/ru/trunk/reference/xhprof/functions/xhprof-sample-disable.xml 2020-01-25 08:15:47 UTC (rev 349009)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 330232 Maintainer: rjhdby Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.xhprof-sample-disable" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+ <refname>xhprof_sample_disable</refname>
+ <refpurpose>Остановить сэмплирующие профилирование xhprof</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>array</type><methodname>xhprof_sample_disable</methodname>
+ <void />
+ </methodsynopsis>
+ <para>
+ Остановить сэмплирующие профилирование xhprof.
+ </para>
+
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ &no.function.parameters;
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Массив данных, собранный профайлером.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <example>
+ <title>Пример использования <function>xhprof_sample_disable</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+xhprof_sample_enable();
+
+for ($i = 0; $i <= 10000; $i++) {
+ $a = strlen($i);
+ $b = $i * $a;
+ $c = rand();
+}
+
+$xhprof_data = xhprof_sample_disable();
+
+print_r($xhprof_data);
+?>
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+Array
+(
+ [1272935300.800000] => main()
+ [1272935300.900000] => main()
+)
+]]>
+ </screen>
+ </example>
+ </refsect1>
+
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
Property changes on: phpdoc/ru/trunk/reference/xhprof/functions/xhprof-sample-disable.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property
Added: phpdoc/ru/trunk/reference/xhprof/functions/xhprof-sample-enable.xml
===================================================================
--- phpdoc/ru/trunk/reference/xhprof/functions/xhprof-sample-enable.xml (rev 0)
+++ phpdoc/ru/trunk/reference/xhprof/functions/xhprof-sample-enable.xml 2020-01-25 08:15:47 UTC (rev 349009)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 330232 Maintainer: rjhdby Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.xhprof-sample-enable" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <refnamediv>
+ <refname>xhprof_sample_enable</refname>
+ <refpurpose>Запуск сэмплирующего режима профилирования XHProf</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>void</type><methodname>xhprof_sample_enable</methodname>
+ <void />
+ </methodsynopsis>
+ <para>
+ Запуск сэмплирующего режима профилирования, который является
+ облегченной версией <function>xhprof_enable</function>. Интервал
+ семплирования составляет 0.1 секунды и при каждой итерации
+ записывается стек вызовов. Данный режим предназначен для
+ снижения накладных расходов при мониторинге производительности.
+ </para>
+
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ &no.function.parameters;
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ &null;
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <simplelist>
+ <member><function>xhprof_sample_disable</function></member>
+ <member><function>xhprof_enable</function></member>
+ <member><function>memory_get_usage</function></member>
+ <member><function>getrusage</function></member>
+ </simplelist>
+ </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
Property changes on: phpdoc/ru/trunk/reference/xhprof/functions/xhprof-sample-enable.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
\ No newline at end of property