01: /*
02: * Copyright (c) 2002 by Matt Welsh and The Regents of the University of
03: * California. All rights reserved.
04: *
05: * Permission to use, copy, modify, and distribute this software and its
06: * documentation for any purpose, without fee, and without written agreement is
07: * hereby granted, provided that the above copyright notice and the following
08: * two paragraphs appear in all copies of this software.
09: *
10: * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
11: * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
12: * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
13: * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14: *
15: * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
16: * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
17: * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
18: * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
19: * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
20: *
21: * Author: Matt Welsh <mdw@cs.berkeley.edu>
22: *
23: */
24:
25: package seda.sandStorm.api.internal;
26:
27: /**
28: * This interface allows various components of the system to record and
29: * gather statistics about the stage during execution.
30: *
31: * @author Matt Welsh
32: */
33:
34: public interface StageStatsIF {
35:
36: /** Reset all statistics. */
37: public void reset();
38:
39: /** Record a service rate sample. */
40: public void recordServiceRate(int numEvents, long time);
41:
42: /** Get a moving average of the stage's service rate. */
43: public double getServiceRate();
44:
45: /** Get a running total of the number of processed events. */
46: public long getTotalEvents();
47:
48: /** Record a 90th percentile response time sample in msec. */
49: public void record90thRT(double rt_sample);
50:
51: /**
52: * Get a moving average of the stage's 90th percentile response time
53: * in msec.
54: */
55: public double get90thRT();
56:
57: }
|