1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
4
<title>matchers/avgratio.pm</title>
5
<link rev="made" href="mailto:dws@ee.ethz.ch" />
8
<body style="background-color: white">
10
<p><a name="__index__"></a></p>
16
<li><a href="#name">NAME</a></li>
17
<li><a href="#overview">OVERVIEW</a></li>
18
<li><a href="#description">DESCRIPTION</a></li>
19
<li><a href="#example">EXAMPLE</a></li>
20
<li><a href="#copyright">COPYRIGHT</a></li>
21
<li><a href="#sponsorship">SPONSORSHIP</a></li>
22
<li><a href="#license">LICENSE</a></li>
23
<li><a href="#author">AUTHOR</a></li>
30
<h1><a name="name">NAME</a></h1>
31
<p>matchers::avgratio - detect changes in average median latency</p>
35
<h1><a name="overview">OVERVIEW</a></h1>
38
The avgratio matcher establishes a historic average median latency over
39
several measurement rounds. It compares this average, against a second
40
average latency value again build over several rounds of measurment.</pre>
44
<h1><a name="description">DESCRIPTION</a></h1>
45
<p>Call the matcher with the following sequence:</p>
48
pattern = avgratio(historic=>a,current=>b,comparator=>o,percentage=>p)</pre>
50
<dt><strong><a name="item_historic">historic</a></strong><br />
53
The number of median values to use for building the 'historic' average.
56
<dt><strong><a name="item_current">current</a></strong><br />
59
The number of median values to use for building the 'current' average.
62
<dt><strong><a name="item_comparator">comparator</a></strong><br />
65
Which comparison operator should be used to compare current/historic with percentage.
68
<dt><strong><a name="item_percentage">percentage</a></strong><br />
71
Right hand side of the comparison.
75
old <--- historic ---><--- current ---> now</pre>
79
<h1><a name="example">EXAMPLE</a></h1>
80
<p>Take build the average median latency over 10 samples, use this to divid the
81
current average latency built over 2 samples and check if it is bigger than
84
avgratio(historic=>10,current=>2,comparator=>'>',percentage=>150);</pre>
86
avg(current)/avg(historic) > 150/100</pre>
87
<p>This means the matcher will activate when the current latency average if
88
more than 1.5 times the historic latency average established over the last
89
10 rounds of measurement.</p>
93
<h1><a name="copyright">COPYRIGHT</a></h1>
94
<p>Copyright (c) 2004 by OETIKER+PARTNER AG. All rights reserved.</p>
98
<h1><a name="sponsorship">SPONSORSHIP</a></h1>
99
<p>The development of this matcher has been sponsored by Virtela Communications www.virtela.net.</p>
103
<h1><a name="license">LICENSE</a></h1>
104
<p>This program is free software; you can redistribute it and/or modify
105
it under the terms of the GNU General Public License as published by
106
the Free Software Foundation; either version 2 of the License, or
107
(at your option) any later version.</p>
108
<p>This program is distributed in the hope that it will be useful,
109
but WITHOUT ANY WARRANTY; without even the implied warranty of
110
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
111
GNU General Public License for more details.</p>
112
<p>You should have received a copy of the GNU General Public License
113
along with this program; if not, write to the Free Software
114
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</p>
118
<h1><a name="author">AUTHOR</a></h1>
119
<p>Tobias Oetiker <<a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a>></p>