comparison src/org/dancres/blitz/stats/IOStat.java @ 0:3dc0c5604566

Initial checkin of blitz 2.0 fcs - no installer yet.
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 21 Mar 2009 11:00:06 +0000
parents
children 6f68e94c1fb8
comparison
equal deleted inserted replaced
-1:000000000000 0:3dc0c5604566
1 package org.dancres.blitz.stats;
2
3 /**
4 <p>Tracks WriteDaemon statistics. This stat is permanently enabled and
5 cannot be switched on or off. It's maintenance costs are entirely absorbed
6 by the caller recovering stats from StatsBoard.</p>
7
8 @see org.dancres.blitz.disk.WriteDaemon
9 */
10 public class IOStat implements Stat {
11 private long theId;
12
13 private double theTimePerIn;
14 private double theTimePerOut;
15 private double theInOutRatio;
16 private int theQueueSize;
17 private int theThrottleCount;
18
19 public IOStat(long anId, double aTimePerIn, double aTimePerOut,
20 double anInOutRatio, int aQueueSize, int aThrottleCount) {
21 theId = anId;
22 theTimePerIn = aTimePerIn;
23 theTimePerOut = aTimePerOut;
24 theInOutRatio = anInOutRatio;
25 theQueueSize = aQueueSize;
26 theThrottleCount = aThrottleCount;
27 }
28
29 public long getId() {
30 return theId;
31 }
32
33 public double getTimePerIn() {
34 return theTimePerIn;
35 }
36
37 public double getTimePerOut() {
38 return theTimePerOut;
39 }
40
41 public double getInOutRatio() {
42 return theInOutRatio;
43 }
44
45 public int getQueueSize() {
46 return theQueueSize;
47 }
48
49 public String toString() {
50 return "IO TPI: " + theTimePerIn + " TPO: " + theTimePerOut + " IOR: " +
51 theInOutRatio + " QSZ: " + theQueueSize + " THROTTLE: " +
52 theThrottleCount;
53 }
54 }