Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-29468 Document STD.system.log.getElapsedMs #17949

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions docs/EN_US/ECLStandardLibraryReference/SLR-Mods/getElapsedMs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<sect1 id="getElapsedMs">
<title>getElapsedMs</title>

<para><emphasis>result</emphasis> <emphasis role="bold"> :=
STD.System.Log.getElapsedMs<indexterm>
<primary>STD.System.Log.getElapsedMs</primary>
</indexterm> <indexterm>
<primary>System.Log.getElapsedMs</primary>
</indexterm> <indexterm>
<primary>Log.getElapsedMs</primary>
</indexterm> <indexterm>
<primary>getElapsedMs</primary>
</indexterm></emphasis><emphasis></emphasis><emphasis role="bold">
();</emphasis></para>

<informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="2">
<colspec colwidth="80.50pt" />

<colspec />

<tbody>
<row>
<entry>Return:</entry>

<entry>getElapsedMs returns returns the elapsed time in
milliseconds.</entry>
</row>
</tbody>
</tgroup>
</informaltable>

<para>The <emphasis role="bold">getElapsedMs </emphasis>function returns the
current elapsed query time (in ms) in Roxie. </para>

<para>This is the elapsed time when STD.System.Log.getElapsedMs() is called.
Because ECL is a declarative language, code is not necessarily executed in
sequence. You have to be careful when trying to get the elapsed time for a
particular point in your code. You can look at the Workunit graphs to see
the exact point at which the activity executes. </para>

<para><emphasis role="bold">For use in Roxie only</emphasis>. An error is
returned if you try to run on Thor or hThor.</para>

<para>Example:</para>

<programlisting format="linespecific" lang="ECL" role="runnable">IMPORT STD;
STD.System.Debug.Sleep (1054); // pause processing for 1054 milliseconds.
OUTPUT(STD.System.Log.getElapsedMs(), NAMED('Elapsed')); //returns total time elapsed
</programlisting>
</sect1>
3 changes: 3 additions & 0 deletions docs/EN_US/ECLStandardLibraryReference/SLR-includer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,9 @@

<xi:include href="ECLStandardLibraryReference/SLR-Mods/GenerateGloballyUniqueID.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />

<xi:include href="ECLStandardLibraryReference/SLR-Mods/getElapsedMs.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</chapter>

<chapter id="Auditing">
Expand Down
Loading