1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.commsen.stopwatch.reports;
18
19
20 /***
21 * This report contains additional "load" statistics.
22 * The value of "load" shows how many instances of the code being measured are running simultaneously.
23 * This report is udes by {@link com.commsen.stopwatch.engines.LoadStopwatchEngine}
24 *
25 * @deprecated new method {@link com.commsen.stopwatch.Stopwatch#getLoad(int, int)} introduced in version 0.3
26 * @author Milen Dyankov
27 */
28 public class LoadStopwatchReport extends DefaultStopwatchReport {
29
30 private static final long serialVersionUID = 1L;
31
32 private long minLoad;
33 private long maxLoad;
34 private long averageLoad;
35
36
37 /***
38 * @param group
39 * @param label
40 * @param count
41 * @param minTime
42 * @param maxTime
43 * @param averageTime
44 * @param totalTime
45 * @param minLoad
46 * @param maxLoad
47 * @param averageLoad
48 */
49 public LoadStopwatchReport(String group, String label, long count, long minTime, long maxTime, long averageTime, long totalTime, long minLoad, long maxLoad, long averageLoad) {
50 super (group, label, count, minTime, maxTime, averageTime, totalTime);
51 this.minLoad = minLoad;
52 this.maxLoad = maxLoad;
53 this.averageLoad = averageLoad;
54 }
55
56 /***
57 * Generates string representation of this report
58 * @see java.lang.Object#toString()
59 */
60 public String toString() {
61 return
62 new StringBuffer(super.toString())
63 .append(" MinLoad=").append(minLoad)
64 .append(" AvgLoad=").append(averageLoad)
65 .append(" MaxLoad=").append(maxLoad)
66 .toString();
67 }
68
69
70 /***
71 * @return Returns the averageLoad.
72 */
73 public long getAverageLoad() {
74 return averageLoad;
75 }
76
77 /***
78 * @return Returns the maxLoad.
79 */
80 public long getMaxLoad() {
81 return maxLoad;
82 }
83
84 /***
85 * @return Returns the minLoad.
86 */
87 public long getMinLoad() {
88 return minLoad;
89 }
90
91
92
93
94 public boolean equals(Object obj) {
95
96 return super.equals(obj);
97 }
98
99
100
101
102 public int hashCode() {
103
104 return super.hashCode();
105 }
106
107 }