File: statistics_user.sgml

package info (click to toggle)
openser 1.1.0-9etch1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,828 kB
  • ctags: 11,809
  • sloc: ansic: 120,528; sh: 5,249; yacc: 1,716; makefile: 1,261; php: 656; perl: 205; sql: 190
file content (147 lines) | stat: -rw-r--r-- 3,542 bytes parent folder | download
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
<!-- Module User's Guide -->

<chapter>
	<chapterinfo>
	<revhistory>
		<revision>
		<revnumber>$Revision: 1.1 $</revnumber>
		<date>$Date: 2006/03/14 16:36:39 $</date>
		</revision>
	</revhistory>
	</chapterinfo>
	<title>User's Guide</title>
	
	<section>
	<title>Overview</title>
	<para>
		The <acronym>Statistics</acronym> module is a wrapper over the internal
		statistics manager, allowing the script writer to dynamically define and
		use of statistic variables.
	</para>
	<para>
		By bringing the statistics support into the script, it takes advantage
		of the script flexibility in defining logics, making possible 
		implementation of any kind of statistic scenario.
	</para>
	</section>
	<section>
	<title>Dependencies</title>
	<section>
		<title>&ser; Modules</title>
		<para>
		The following modules must be loaded before this module:
			<itemizedlist>
			<listitem>
			<para>
				<emphasis>No dependencies on other &ser; modules</emphasis>.
			</para>
			</listitem>
			</itemizedlist>
		</para>
	</section>
	<section>
		<title>External Libraries or Applications</title>
		<para>
		The following libraries or applications must be installed before running
		&ser; with this module loaded:
			<itemizedlist>
			<listitem>
			<para>
				<emphasis>None</emphasis>.
			</para>
			</listitem>
			</itemizedlist>
		</para>
	</section>
	</section>

	<section>
	<title>Exported Parameters</title>
	<section>
		<title><varname>variable</varname> (string)</title>
		<para>
		Name of a new statistic variable. The name may be followed by additional
		flag which describe the variable behavior:
		</para>
			<itemizedlist>
			<listitem>
			<para>
				<emphasis>no_reset</emphasis> : variable cannot be reset.
			</para>
			</listitem>
			</itemizedlist>
		<example>
		<title>variable example</title>
		<programlisting format="linespecific">
modparam("statistics", "variable", "register_counter")
modparam("statistics", "variable", "active_calls/no_reset")
</programlisting>
		</example>
	</section>
	</section>

	<section>
	<title>Exported Functions</title>
	<section>
		<title>
		<function moreinfo="none">update_stat(variable,value)</function>
		</title>
		<para>
		Updates the value of the statistic variable with the new value.
		</para>
		<para>Meaning of the parameters is as follows:</para>
		<itemizedlist>
		<listitem>
			<para><emphasis>variable</emphasis> - variable to be updated
			</para>
		</listitem>
		<listitem>
			<para><emphasis>value</emphasis> - value to update with; it may be
			also negative
			</para>
		</listitem>
		</itemizedlist>
		<para>
		This function can be used from REQUEST_ROUTE, BRANCH_ROUTE, 
		FAILURE_ROUTE and ONREPLY_ROUTE.
		</para>
		<example>
		<title><function>update_stat</function> usage</title>
		<programlisting format="linespecific">
...
update_stat("register_counter", "+1");
...
update_stat("active_calls", "-1");
...
</programlisting>
		</example>
	</section>

	<section>
		<title>
		<function moreinfo="none">reset_stat(variable)</function>
		</title>
		<para>
		Resets to zero the value of the statistic variable.
		</para>
		<para>
		This function can be used from REQUEST_ROUTE, BRANCH_ROUTE, 
		FAILURE_ROUTE and ONREPLY_ROUTE.
		</para>
		<example>
		<title><function>reset_stat</function> usage</title>
		<programlisting format="linespecific">
...
reset_stat("register_counter");
...
</programlisting>
		</example>
	</section>
	</section>
</chapter>

<!-- Keep this element at the end of the file
Local Variables:
sgml-parent-document: ("statistics.sgml" "Book" "chapter")
End:
-->