php-doc-en/reference/scoutapm/functions/scoutapm-get-calls.xml
2019-12-31 10:04:08 +00:00

108 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.scoutapm-get-calls" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>scoutapm_get_calls</refname>
<refpurpose>Returns a list of instrumented calls that have occurred</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>scoutapm_get_calls</methodname>
<void />
</methodsynopsis>
<para>Returns a list of any instrumented function calls since <function>scoutapm_get_calls</function> was last called. The list is cleared each time the function is called.</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<function>scoutapm_get_calls</function> returns an array containing a list
of all recorded calls to instrumented function calls.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example><title>Fetch instrumented calls</title>
<programlisting role="php">
<![CDATA[
<?php
file_get_contents('a.txt');
file_get_contents('b.txt');
print_r(scoutapm_get_calls());
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
Array
(
[0] => Array
(
[function] => file_get_contents
[entered] => 1576839727.7934
[exited] => 1576839727.7935
[time_taken] => 2.7894973754883E-5
[argv] => Array
(
[0] => a.txt
)
)
[1] => Array
(
[function] => file_get_contents
[entered] => 1576839727.7935
[exited] => 1576839727.7935
[time_taken] => 7.8678131103516E-6
[argv] => Array
(
[0] => b.txt
)
)
)
]]>
</screen>
</example>
</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
-->