1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
4 <meta http-equiv=
"Content-Type" content=
"text/html;charset=iso-8859-1">
5 <title>File Index
</title>
6 <link href=
"doxygen.css" rel=
"stylesheet" type=
"text/css">
9 <!-- Generated by Doxygen 1.3.4 -->
10 <div class=
"qindex"><a class=
"qindex" href=
"main.html">Main
Page
</a> |
<a class=
"qindex" href=
"classes.html">Alphabetical
List
</a> |
<a class=
"qindex" href=
"annotated.html">Data
Structures
</a> |
<a class=
"qindex" href=
"files.html">File
List
</a> |
<a class=
"qindex" href=
"functions.html">Data
Fields
</a> |
<a class=
"qindex" href=
"globals.html">Globals
</a></div>
11 <h1>dmxstat.c File Reference
</h1><code>#include
"<a class="el
" href="dmx_8h-source.html
">dmx.h</a>"</code><br>
12 <code>#include
"<a class="el
" href="dmxstat_8h-source.html
">dmxstat.h</a>"</code><br>
13 <code>#include
"<a class="el
" href="dmxlog_8h-source.html
">dmxlog.h</a>"</code><br>
14 <code>#include
"Xos.h"</code><br>
15 <table border=
0 cellpadding=
0 cellspacing=
0>
17 <tr><td colspan=
2><br><h2>Data Structures
</h2></td></tr>
18 <tr><td class=
"memItemLeft" nowrap align=right valign=top
>struct
</td><td class=
"memItemRight" valign=bottom
><a class=
"el" href=
"struct__DMXStatAvg.html">_DMXStatAvg
</a></td></tr>
20 <tr><td class=
"memItemLeft" nowrap align=right valign=top
>struct
</td><td class=
"memItemRight" valign=bottom
><a class=
"el" href=
"struct__DMXStatInfo.html">_DMXStatInfo
</a></td></tr>
22 <tr><td colspan=
2><br><h2>Typedefs
</h2></td></tr>
23 <tr><td class=
"memItemLeft" nowrap align=right valign=top
>typedef
<a class=
"el" href=
"struct__DMXStatAvg.html">_DMXStatAvg
</a> </td><td class=
"memItemRight" valign=bottom
><a class=
"el" href=
"dmxstat_8c.html#a0">DMXStatAvg
</a></td></tr>
25 <tr><td colspan=
2><br><h2>Functions
</h2></td></tr>
26 <tr><td class=
"memItemLeft" nowrap align=right valign=top
>void
</td><td class=
"memItemRight" valign=bottom
><a class=
"el" href=
"dmxstat_8c.html#a6">dmxStatActivate
</a> (const char *interval, const char *displays)
</td></tr>
28 <tr><td class=
"memItemLeft" nowrap align=right valign=top
><a class=
"el" href=
"struct__DMXStatInfo.html">DMXStatInfo
</a> *
</td><td class=
"memItemRight" valign=bottom
><a class=
"el" href=
"dmxstat_8c.html#a7">dmxStatAlloc
</a> (void)
</td></tr>
30 <tr><td class=
"memItemLeft" nowrap align=right valign=top
>void
</td><td class=
"memItemRight" valign=bottom
><a class=
"el" href=
"dmxstat_8c.html#a8">dmxStatFree
</a> (
<a class=
"el" href=
"struct__DMXStatInfo.html">DMXStatInfo
</a> *pt)
</td></tr>
32 <tr><td class=
"memItemLeft" nowrap align=right valign=top
>void
</td><td class=
"memItemRight" valign=bottom
><a class=
"el" href=
"dmxstat_8c.html#a10">dmxStatSync
</a> (
<a class=
"el" href=
"struct__DMXScreenInfo.html">DMXScreenInfo
</a> *dmxScreen, struct timeval *stop, struct timeval *start, unsigned long pending)
</td></tr>
34 <tr><td class=
"memItemLeft" nowrap align=right valign=top
>void
</td><td class=
"memItemRight" valign=bottom
><a class=
"el" href=
"dmxstat_8c.html#a12">dmxStatInit
</a> (void)
</td></tr>
36 <tr><td colspan=
2><br><h2>Variables
</h2></td></tr>
37 <tr><td class=
"memItemLeft" nowrap align=right valign=top
>int
</td><td class=
"memItemRight" valign=bottom
><a class=
"el" href=
"dmxstat_8c.html#a1">dmxStatInterval
</a></td></tr>
40 <hr><a name=
"_details"></a><h2>Detailed Description
</h2>
41 The DMX server code is written to call
<a class=
"el" href=
"dmxsync_8c.html#a9">dmxSync()
</a> whenever an XSync() might be necessary. However, since XSync() requires a two way communication with the other X server, eliminating unnecessary XSync() calls is a key performance optimization. Support for this optimization is provided in #dmxsync.c. This file provides routines that evaluate this optimization by counting the number of XSync() calls and monitoring their latency. This functionality can be turned on using the -stat command-line parameter.
<hr><h2>Typedef Documentation
</h2>
42 <a class=
"anchor" name=
"a0" doxytag=
"dmxstat.c::DMXStatAvg" ></a><p>
43 <table class=
"mdTable" width=
"100%" cellpadding=
"2" cellspacing=
"0">
46 <table cellpadding=
"0" cellspacing=
"0" border=
"0">
48 <td class=
"md" nowrap
valign=
"top"> typedef struct
<a class=
"el" href=
"struct__DMXStatAvg.html">_DMXStatAvg
</a> <a class=
"el" href=
"struct__DMXStatAvg.html">DMXStatAvg
</a>
53 <table cellspacing=
5 cellpadding=
0 border=
0>
61 Used to compute a running average of value.
</td>
64 <hr><h2>Function Documentation
</h2>
65 <a class=
"anchor" name=
"a6" doxytag=
"dmxstat.c::dmxStatActivate" ></a><p>
66 <table class=
"mdTable" width=
"100%" cellpadding=
"2" cellspacing=
"0">
69 <table cellpadding=
"0" cellspacing=
"0" border=
"0">
71 <td class=
"md" nowrap
valign=
"top"> void dmxStatActivate
</td>
72 <td class=
"md" valign=
"top">(
</td>
73 <td class=
"md" nowrap
valign=
"top">const char *
</td>
74 <td class=
"mdname" nowrap
> <em>interval
</em>,
</td>
79 <td class=
"md" nowrap
>const char *
</td>
80 <td class=
"mdname" nowrap
> <em>displays
</em></td>
84 <td class=
"md">)
</td>
85 <td class=
"md" colspan=
"2"></td>
92 <table cellspacing=
5 cellpadding=
0 border=
0>
100 Turn on XSync statistic gathering and printing. Print every
<em>interval
</em> seconds, with lines for the first
<em>displays
</em>. If
<em>interval
</em> is NULL,
1 will be used. If
<em>displays
</em> is NULL,
0 will be used (meaning a line for every display will be printed). Note that this function takes string arguments because it will usually be called from
<a class=
"el" href=
"dmxinit_8c.html#a40">ddxProcessArgument
</a> in #dmxinit.c.
</td>
103 <a class=
"anchor" name=
"a7" doxytag=
"dmxstat.c::dmxStatAlloc" ></a><p>
104 <table class=
"mdTable" width=
"100%" cellpadding=
"2" cellspacing=
"0">
107 <table cellpadding=
"0" cellspacing=
"0" border=
"0">
109 <td class=
"md" nowrap
valign=
"top"> <a class=
"el" href=
"struct__DMXStatInfo.html">DMXStatInfo
</a>* dmxStatAlloc
</td>
110 <td class=
"md" valign=
"top">(
</td>
111 <td class=
"md" nowrap
valign=
"top">void
</td>
112 <td class=
"mdname1" valign=
"top" nowrap
> </td>
113 <td class=
"md" valign=
"top"> )
</td>
114 <td class=
"md" nowrap
></td>
121 <table cellspacing=
5 cellpadding=
0 border=
0>
129 Allocate a
<em>DMXStatInfo
</em> structure.
</td>
132 <a class=
"anchor" name=
"a8" doxytag=
"dmxstat.c::dmxStatFree" ></a><p>
133 <table class=
"mdTable" width=
"100%" cellpadding=
"2" cellspacing=
"0">
136 <table cellpadding=
"0" cellspacing=
"0" border=
"0">
138 <td class=
"md" nowrap
valign=
"top"> void dmxStatFree
</td>
139 <td class=
"md" valign=
"top">(
</td>
140 <td class=
"md" nowrap
valign=
"top"><a class=
"el" href=
"struct__DMXStatInfo.html">DMXStatInfo
</a> *
</td>
141 <td class=
"mdname1" valign=
"top" nowrap
> <em>pt
</em> </td>
142 <td class=
"md" valign=
"top"> )
</td>
143 <td class=
"md" nowrap
></td>
150 <table cellspacing=
5 cellpadding=
0 border=
0>
158 Free the memory used by a
<em>DMXStatInfo
</em> structure.
</td>
161 <a class=
"anchor" name=
"a12" doxytag=
"dmxstat.c::dmxStatInit" ></a><p>
162 <table class=
"mdTable" width=
"100%" cellpadding=
"2" cellspacing=
"0">
165 <table cellpadding=
"0" cellspacing=
"0" border=
"0">
167 <td class=
"md" nowrap
valign=
"top"> void dmxStatInit
</td>
168 <td class=
"md" valign=
"top">(
</td>
169 <td class=
"md" nowrap
valign=
"top">void
</td>
170 <td class=
"mdname1" valign=
"top" nowrap
> </td>
171 <td class=
"md" valign=
"top"> )
</td>
172 <td class=
"md" nowrap
></td>
179 <table cellspacing=
5 cellpadding=
0 border=
0>
187 Try to initialize the statistic gathering and printing routines. Initialization only takes place if
<a class=
"el" href=
"dmxstat_8h.html#a6">dmxStatActivate
</a> has already been called. We don't need the same generation protection that we used in dmxSyncInit because our timer is always on a queue -- hence, server generation will always free it.
</td>
190 <a class=
"anchor" name=
"a10" doxytag=
"dmxstat.c::dmxStatSync" ></a><p>
191 <table class=
"mdTable" width=
"100%" cellpadding=
"2" cellspacing=
"0">
194 <table cellpadding=
"0" cellspacing=
"0" border=
"0">
196 <td class=
"md" nowrap
valign=
"top"> void dmxStatSync
</td>
197 <td class=
"md" valign=
"top">(
</td>
198 <td class=
"md" nowrap
valign=
"top"><a class=
"el" href=
"struct__DMXScreenInfo.html">DMXScreenInfo
</a> *
</td>
199 <td class=
"mdname" nowrap
> <em>dmxScreen
</em>,
</td>
204 <td class=
"md" nowrap
>struct timeval *
</td>
205 <td class=
"mdname" nowrap
> <em>stop
</em>,
</td>
210 <td class=
"md" nowrap
>struct timeval *
</td>
211 <td class=
"mdname" nowrap
> <em>start
</em>,
</td>
216 <td class=
"md" nowrap
>unsigned long
</td>
217 <td class=
"mdname" nowrap
> <em>pending
</em></td>
221 <td class=
"md">)
</td>
222 <td class=
"md" colspan=
"2"></td>
229 <table cellspacing=
5 cellpadding=
0 border=
0>
237 Note that a XSync() was just done on
<em>dmxScreen
</em> with the
<em>start
</em> and
<em>stop
</em> times (from gettimeofday()) and the number of pending-but-not-yet-processed XSync requests. This routine is called from #dmxDoSync in #dmxsync.c
</td>
240 <hr><h2>Variable Documentation
</h2>
241 <a class=
"anchor" name=
"a1" doxytag=
"dmxstat.c::dmxStatInterval" ></a><p>
242 <table class=
"mdTable" width=
"100%" cellpadding=
"2" cellspacing=
"0">
245 <table cellpadding=
"0" cellspacing=
"0" border=
"0">
247 <td class=
"md" nowrap
valign=
"top"> int
<a class=
"el" href=
"dmxstat_8h.html#a5">dmxStatInterval
</a>
252 <table cellspacing=
5 cellpadding=
0 border=
0>
260 Only for
<a class=
"el" href=
"dmxstat_8c.html">dmxstat.c
</a> and
<a class=
"el" href=
"dmxsync_8c.html">dmxsync.c
</a> </td>
266 Generated June
29,
2004 for
<a
267 href=
"http://dmx.sourceforge.net">Distributed Multihead X
</a> by
268 <a href=
"http://www.doxygen.org/index.html">doxygen
</a>