-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStat.java
More file actions
51 lines (46 loc) · 1.04 KB
/
Stat.java
File metadata and controls
51 lines (46 loc) · 1.04 KB
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
// -------------------------------------------------------------------------
/**
* statics file writer.
*
* @author wenfeng ren
* @version Nov 3, 2014
*/
public class Stat
{
/**
* file name
*/
public static String fileName;
/**
* cache hits
*/
public static int cacheHits = 0;
/**
* times of disk reads
*/
public static int diskReads = 0;
/**
* times of disk writes
*/
public static int diskWrites = 0;
/**
* execution time
*/
public static long executionTime = 0;
// ----------------------------------------------------------
/**
* output info.
*
* @return the output string
*/
public static String output()
{
String output = "";
output += "\nSort on " + fileName;
output += "\nCache Hits: " + cacheHits;
output += "\nDisk Reads: " + diskReads;
output += "\nDisk Writes: " + diskWrites;
output += "\nTime is " + executionTime;
return output;
}
}