Skip to content

Commit

Permalink
HPCC-29468 Document STD.system.log.getElapsedMs
Browse files Browse the repository at this point in the history
Signed-off-by: Jim DeFabia <[email protected]>
  • Loading branch information
Jim DeFabia committed Nov 7, 2023
1 parent c0ec1dc commit b4d19f3
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
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

0 comments on commit b4d19f3

Please sign in to comment.