<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <META name="GENERATOR" content="hevea 1.06-7 of 2001-11-14"> <TITLE> System statistics </TITLE> </HEAD> <BODY TEXT=black BGCOLOR=white> <A HREF="manual046.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A> <A HREF="manual023.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A> <A HREF="manual048.html"><IMG SRC ="next_motif.gif" ALT="Next"></A> <HR> <TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%"> <TR><TD BGCOLOR="#66dbff"><DIV ALIGN=center><TABLE> <TR><TD><FONT SIZE=4><B><A NAME="htoc231">7.24</A></B></FONT></TD> <TD WIDTH="100%" ALIGN=center><FONT SIZE=4><B>System statistics</B></FONT></TD> </TR></TABLE></DIV></TD> </TR></TABLE><UL> <LI><A HREF="manual047.html#toc186"> <TT>statistics/0</TT>, <TT>statistics/2</TT></A> <LI><A HREF="manual047.html#toc187"> <TT>user_time/1</TT>, <TT>system_time/1</TT>, <TT>cpu_time/1</TT>, <TT>real_time/1</TT></A> </UL> <BR> <A NAME="toc186"></A><TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%"> <TR><TD BGCOLOR="#98e7ff"><DIV ALIGN=center><TABLE> <TR><TD><B><A NAME="htoc232">7.24.1</A></B></TD> <TD WIDTH="100%" ALIGN=center><B><TT>statistics/0</TT>, <TT>statistics/2</TT></B></TD> </TR></TABLE></DIV></TD> </TR></TABLE> <BR> <B>Templates</B> <DL COMPACT=compact><DT><DD><TT> statistics<BR> statistics(?atom, ?list)</TT></DL> <B>Description</B><BR> <BR> <TT>statistics</TT> displays statistics about memory usage and run times.<BR> <BR> <TT>statistics(Key, Value)</TT> unifies <TT>Value</TT> with the current value of the statistics key <TT>Key</TT>. <TT>Value</TT> a list of two elements. Times are in milliseconds, sizes of areas in bytes.<BR> <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1> <TR><TD ALIGN=left NOWRAP>Key</TD> <TD ALIGN=left NOWRAP>Description</TD> <TD ALIGN=left NOWRAP>Value</TD> </TR> <TR><TD ALIGN=left NOWRAP><TT>user_time</TT></TD> <TD ALIGN=left NOWRAP>user CPU time</TD> <TD ALIGN=left NOWRAP><TT>[SinceStart, SinceLast]</TT></TD> </TR> <TR><TD ALIGN=left NOWRAP><TT>system_time</TT></TD> <TD ALIGN=left NOWRAP>system CPU time</TD> <TD ALIGN=left NOWRAP><TT>[SinceStart, SinceLast]</TT></TD> </TR> <TR><TD ALIGN=left NOWRAP><TT>cpu_time</TT></TD> <TD ALIGN=left NOWRAP>total CPU time (user + system)</TD> <TD ALIGN=left NOWRAP><TT>[SinceStart, SinceLast]</TT></TD> </TR> <TR><TD ALIGN=left NOWRAP><TT>real_time</TT></TD> <TD ALIGN=left NOWRAP>absolute time</TD> <TD ALIGN=left NOWRAP><TT>[SinceStart, SinceLast]</TT></TD> </TR> <TR><TD ALIGN=left NOWRAP><TT>local_stack</TT></TD> <TD ALIGN=left NOWRAP>local stack sizes (control, environments, choices)</TD> <TD ALIGN=left NOWRAP><TT>[UsedSize, FreeSize]</TT></TD> </TR> <TR><TD ALIGN=left NOWRAP><TT>global_stack</TT></TD> <TD ALIGN=left NOWRAP>global stack sizes (compound terms)</TD> <TD ALIGN=left NOWRAP><TT>[UsedSize, FreeSize]</TT></TD> </TR> <TR><TD ALIGN=left NOWRAP><TT>trail_stack</TT></TD> <TD ALIGN=left NOWRAP>trail stack sizes (variable bindings to undo)</TD> <TD ALIGN=left NOWRAP><TT>[UsedSize, FreeSize]</TT></TD> </TR> <TR><TD ALIGN=left NOWRAP><TT>cstr_stack</TT></TD> <TD ALIGN=left NOWRAP>constraint trail sizes (finite domain constraints)</TD> <TD ALIGN=left NOWRAP><TT>[UsedSize, FreeSize]</TT></TD> </TR></TABLE><BR> Note that the key <TT>runtime</TT> is recognized as <TT>user_time</TT> for compatibility purpose.<BR> <BR> <B>Errors</B><BR> <TABLE CELLSPACING=2 CELLPADDING=0> <TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD> </TR> <TR><TD VALIGN=top ALIGN=left><TT>Key</TT> is neither a variable nor a valid key</TD> <TD VALIGN=top ALIGN=center NOWRAP> </TD> <TD VALIGN=top ALIGN=left><TT>domain_error(statistics_key, Key)</TT></TD> </TR> <TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD> </TR> <TR><TD VALIGN=top ALIGN=left><TT>Value</TT> is neither a variable nor a list of two elements</TD> <TD VALIGN=top ALIGN=center NOWRAP> </TD> <TD VALIGN=top ALIGN=left><TT>domain_error(statistics_value, Value)</TT></TD> </TR> <TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD> </TR> <TR><TD VALIGN=top ALIGN=left><TT>Value</TT> is a list of two elements and an element <TT>E</TT> is neither a variable nor an integer</TD> <TD VALIGN=top ALIGN=center NOWRAP> </TD> <TD VALIGN=top ALIGN=left><TT>type_error(integer, E)</TT></TD> </TR> <TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD> </TR></TABLE><BR> <B>Portability</B><BR> <BR> GNU Prolog predicates.<BR> <BR> <A NAME="toc187"></A><TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%"> <TR><TD BGCOLOR="#98e7ff"><DIV ALIGN=center><TABLE> <TR><TD><B><A NAME="htoc233">7.24.2</A></B></TD> <TD WIDTH="100%" ALIGN=center><B><TT>user_time/1</TT>, <TT>system_time/1</TT>, <TT>cpu_time/1</TT>, <TT>real_time/1</TT></B></TD> </TR></TABLE></DIV></TD> </TR></TABLE> <A NAME="user-time/1"></A> <BR> <B>Templates</B> <DL COMPACT=compact><DT><DD><TT> user_time(?integer)<BR> system_time(?integer)<BR> cpu_time(?integer)<BR> real_time(?integer)</TT></DL> <B>Description</B><BR> <BR> <TT>user_time(Time)</TT> unifies <TT>Time</TT> with the user CPU time elapsed since the start of Prolog.<BR> <BR> <TT>system_time(Time)</TT> unifies <TT>Time</TT> with the system CPU time elapsed since the start of Prolog.<BR> <BR> <TT>cpu_time(Time)</TT> unifies <TT>Time</TT> with the CPU time (user + system) elapsed since the start of Prolog.<BR> <BR> <TT>real_time(Time)</TT> unifies <TT>Time</TT> with the absolute time elapsed since the start of Prolog.<BR> <BR> <B>Errors</B><BR> <TABLE CELLSPACING=2 CELLPADDING=0> <TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD> </TR> <TR><TD VALIGN=top ALIGN=left><TT>Time</TT> is neither a variable nor an integer</TD> <TD VALIGN=top ALIGN=center NOWRAP> </TD> <TD VALIGN=top ALIGN=left><TT>type_error(integer, Time)</TT></TD> </TR> <TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD> </TR></TABLE><BR> <B>Portability</B><BR> <BR> GNU Prolog predicates.<BR> <BR> <HR SIZE=2> Copyright (C) 1999-2002 Daniel Diaz <BR> <BR> Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. <BR> <BR> <A HREF="index.html#copyright">More about the copyright</A> <HR> <A HREF="manual046.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A> <A HREF="manual023.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A> <A HREF="manual048.html"><IMG SRC ="next_motif.gif" ALT="Next"></A> </BODY> </HTML>