/usr/lib/swi-prolog/doc/Manual/statistics.html is in swi-prolog-nox 5.10.4-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>SWI-Prolog 5.11.18 Reference Manual: Section 4.38</TITLE><LINK REL=home HREF="index.html">
<LINK REL=contents HREF="Contents.html">
<LINK REL=index HREF="DocIndex.html">
<LINK REL=summary HREF="summary.html">
<LINK REL=previous HREF="debugger.html">
<LINK REL=next HREF="profile.html">
<STYLE type="text/css">
/* Style sheet for SWI-Prolog latex2html
*/
dd.defbody
{ margin-bottom: 1em;
}
dt.pubdef
{ background-color: #c5e1ff;
}
dt.multidef
{ background-color: #c8ffc7;
}
.bib dd
{ margin-bottom: 1em;
}
.bib dt
{ float: left;
margin-right: 1.3ex;
}
pre.code
{ margin-left: 1.5em;
margin-right: 1.5em;
border: 1px dotted;
padding-top: 5px;
padding-left: 5px;
padding-bottom: 5px;
background-color: #f8f8f8;
}
div.navigate
{ text-align: center;
background-color: #f0f0f0;
border: 1px dotted;
padding: 5px;
}
div.title
{ text-align: center;
padding-bottom: 1em;
font-size: 200%;
font-weight: bold;
}
div.author
{ text-align: center;
font-style: italic;
}
div.abstract
{ margin-top: 2em;
background-color: #f0f0f0;
border: 1px dotted;
padding: 5px;
margin-left: 10%; margin-right:10%;
}
div.abstract-title
{ text-align: center;
padding: 5px;
font-size: 120%;
font-weight: bold;
}
div.toc-h1
{ font-size: 200%;
font-weight: bold;
}
div.toc-h2
{ font-size: 120%;
font-weight: bold;
margin-left: 2em;
}
div.toc-h3
{ font-size: 100%;
font-weight: bold;
margin-left: 4em;
}
div.toc-h4
{ font-size: 100%;
margin-left: 6em;
}
span.sec-nr
{
}
span.sec-title
{
}
span.pred-ext
{ font-weight: bold;
}
span.pred-tag
{ float: right;
padding-top: 0.2em;
font-size: 80%;
font-style: italic;
color: #202020;
}
/* Footnotes */
sup.fn { color: blue; text-decoration: underline; }
span.fn-text { display: none; }
sup.fn span {display: none;}
sup:hover span
{ display: block !important;
position: absolute; top: auto; left: auto; width: 80%;
color: #000; background: white;
border: 2px solid;
padding: 5px; margin: 10px; z-index: 100;
font-size: smaller;
}
</STYLE>
</HEAD>
<BODY BGCOLOR="white">
<DIV class="navigate"><A class="nav" href="index.html"><IMG SRC="home.gif" BORDER=0 ALT="Home"></A>
<A class="nav" href="Contents.html"><IMG SRC="index.gif" BORDER=0 ALT="Contents"></A>
<A class="nav" href="DocIndex.html"><IMG SRC="yellow_pages.gif" BORDER=0 ALT="Index"></A>
<A class="nav" href="summary.html"><IMG SRC="info.gif" BORDER=0 ALT="Summary"></A>
<A class="nav" href="debugger.html"><IMG SRC="prev.gif" BORDER=0 ALT="Previous"></A>
<A class="nav" href="profile.html"><IMG SRC="next.gif" BORDER=0 ALT="Next"></A>
</DIV>
<H2><A NAME="sec:4.38"><SPAN class="sec-nr">4.38</SPAN> <SPAN class="sec-title">Obtaining
Runtime Statistics</SPAN></A></H2>
<A NAME="sec:statistics"></A>
<DL class="latex">
<DT class="pubdef"><A NAME="statistics/2"><STRONG>statistics</STRONG>(<VAR>+Key,
-Value</VAR>)</A></DT>
<DD class="defbody">
Unify system statistics determined by <VAR>Key</VAR> with <VAR>Value</VAR>.
The possible keys are given in the <A class="tab" href="statistics.html#tab:statistics">table
5</A>. The last part of the table contains keys for compatibility with
other Prolog implementations (Quintus) for improved portability. Note
that the ISO standard does not define methods to collect system
statistics. Space unit is bytes<SUP class="fn">75<SPAN class="fn-text">This
may change to `cells' to enhance compatibility between the 32- and
64-bit versions.</SPAN></SUP>. Times are in seconds, represented as a
floating point number. The Quintus compatibility keys express times in
milliseconds.
<P>
<CENTER>
<TABLE BORDER=2 FRAME=box RULES=groups>
<TR VALIGN=top><TD>agc</TD><TD>Number of atom garbage-collections
performed </TD></TR>
<TR VALIGN=top><TD>agc_gained</TD><TD>Number of atoms removed </TD></TR>
<TR VALIGN=top><TD>agc_time</TD><TD>Time spent in atom
garbage-collections </TD></TR>
<TR VALIGN=top><TD>cputime</TD><TD>(User) <font size=-1>CPU</font> time
since Prolog was started in seconds </TD></TR>
<TR VALIGN=top><TD>inferences</TD><TD>Total number of passes via the
call and redo ports since Prolog was started. </TD></TR>
<TR VALIGN=top><TD>heap</TD><TD>Estimated total size of the heap (see <A class="sec" href="limits.html">section
2.18.1.1</A>) </TD></TR>
<TR VALIGN=top><TD>heapused</TD><TD>Bytes heap in use by Prolog. </TD></TR>
<TR VALIGN=top><TD>heaplimit</TD><TD>Maximum size of the heap (see <A class="sec" href="limits.html">section
2.18.1.1</A>) </TD></TR>
<TR VALIGN=top><TD>c_stack</TD><TD>System (C-) stack limit. 0 if not
known. </TD></TR>
<TR VALIGN=top><TD>stack</TD><TD>Total memory in use for stacks in all
threads </TD></TR>
<TR VALIGN=top><TD>local</TD><TD>Allocated size of the local stack in
bytes. </TD></TR>
<TR VALIGN=top><TD>localused</TD><TD>Number of bytes in use on the local
stack. </TD></TR>
<TR VALIGN=top><TD>locallimit</TD><TD>Size to which the local stack is
allowed to grow </TD></TR>
<TR VALIGN=top><TD>global</TD><TD>Allocated size of the global stack in
bytes. </TD></TR>
<TR VALIGN=top><TD>globalused</TD><TD>Number of bytes in use on the
global stack. </TD></TR>
<TR VALIGN=top><TD>globallimit</TD><TD>Size to which the global stack is
allowed to grow </TD></TR>
<TR VALIGN=top><TD>trail</TD><TD>Allocated size of the trail stack in
bytes. </TD></TR>
<TR VALIGN=top><TD>trailused</TD><TD>Number of bytes in use on the trail
stack. </TD></TR>
<TR VALIGN=top><TD>traillimit</TD><TD>Size to which the trail stack is
allowed to grow </TD></TR>
<TR VALIGN=top><TD>atoms</TD><TD>Total number of defined atoms. </TD></TR>
<TR VALIGN=top><TD>functors</TD><TD>Total number of defined name/arity
pairs. </TD></TR>
<TR VALIGN=top><TD>predicates</TD><TD>Total number of predicate
definitions. </TD></TR>
<TR VALIGN=top><TD>modules</TD><TD>Total number of module definitions. </TD></TR>
<TR VALIGN=top><TD>codes</TD><TD>Total amount of byte codes in all
clauses. </TD></TR>
<TR VALIGN=top><TD>threads</TD><TD>MT-version: number of active threads </TD></TR>
<TR VALIGN=top><TD>threads_created</TD><TD>MT-version: number of created
threads </TD></TR>
<TR VALIGN=top><TD>thread_cputime</TD><TD>MT-version: seconds CPU time
used by finished threads. Supported on Windows-NT and later, Linux and
possibly a few more. Verify it gives plausible results before using. </TD></TR>
<TBODY>
<TR VALIGN=top><TD COLSPAN=2 ALIGN=center>Compatibility keys (times in
milliseconds)</TR>
<TBODY>
<TR VALIGN=top><TD>runtime</TD><TD>[ CPU time, CPU time since last ]
(milliseconds, excluding time spent in garbage collection) </TD></TR>
<TR VALIGN=top><TD>system_time</TD><TD>[ System CPU time, System CPU
time since last ] (milliseconds)</TD></TR>
<TR VALIGN=top><TD>real_time</TD><TD>[ Wall time, Wall time since last ]
(integer seconds. See <A NAME="idx:gettime1:1192"></A><A class="pred" href="system.html#get_time/1">get_time/1</A>) </TD></TR>
<TR VALIGN=top><TD>walltime</TD><TD>[ Wall time since start, Wall time
since last] (milliseconds, SICStus compatibility) </TD></TR>
<TR VALIGN=top><TD>memory</TD><TD>[ Total unshared data, free memory ]
(Uses getrusage() if available, otherwise incomplete own statistics.) </TD></TR>
<TR VALIGN=top><TD>stacks</TD><TD>[ global use, local use ] </TD></TR>
<TR VALIGN=top><TD>program</TD><TD>[ heap, 0 ] </TD></TR>
<TR VALIGN=top><TD>global_stack</TD><TD>[ global use, global free ] </TD></TR>
<TR VALIGN=top><TD>local_stack</TD><TD>[ local use, local free ] </TD></TR>
<TR VALIGN=top><TD>trail</TD><TD>[ trail use, 0 ] </TD></TR>
<TR VALIGN=top><TD>garbage_collection</TD><TD>[ number of GC, bytes
gained, time spent, bytes left ] The last column is a SWI-Prolog
extension. It contains the sum of the memory left after each collection,
which can be divided by the count to find the average working set size
after GC. Use <CODE>[Count, Gained, Time|_]</CODE> for compatiblity. </TD></TR>
<TR VALIGN=top><TD>stack_shifts</TD><TD>[ global shifts, local shifts,
time spent ] (fails if no shifter in this version) </TD></TR>
<TR VALIGN=top><TD>atoms</TD><TD>[ number, memory use, 0 ] </TD></TR>
<TR VALIGN=top><TD>atom_garbage_collection</TD><TD>[ number of AGC,
bytes gained, time spent ] </TD></TR>
<TR VALIGN=top><TD>core</TD><TD>Same as memory </TD></TR>
</TABLE>
</CENTER>
<TABLE ALIGN=center WIDTH="75%"><TR><TD>
<B>Table 5 : </B>Keys for <A NAME="idx:statistics2:1193"></A><A class="pred" href="statistics.html#statistics/2">statistics/2</A></TABLE>
<A NAME="tab:statistics"></A>
</DD>
<DT class="pubdef"><A NAME="statistics/0"><STRONG>statistics</STRONG></A></DT>
<DD class="defbody">
Display a table of system statistics on the current output stream.
</DD>
<DT class="pubdef"><A NAME="time/1"><STRONG>time</STRONG>(<VAR>:Goal</VAR>)</A></DT>
<DD class="defbody">
Execute <VAR>Goal</VAR> just like <A NAME="idx:once1:1194"></A><A class="pred" href="metacall.html#once/1">once/1</A>
(i.e., leaving no choice points), but print used time, number of logical
inferences and the average number of <VAR>lips</VAR> (logical inferences
per second). Note that SWI-Prolog counts the actual executed number of
inferences rather than the number of passes through the call- and redo
ports of the theoretical 4-port model.
</DD>
</DL>
<P></BODY></HTML>
|