1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.docstore.process;
17
18 import org.kuali.ole.utility.DateTimeUtil;
19
20
21
22
23
24
25
26 public class BulkIngestTimeManager {
27
28 private long recordsCount = 0;
29 private long ingestingTimer = 0;
30 private long indexingTimer = 0;
31 private long processTimer = 0;
32
33 public void reset() {
34 recordsCount = 0;
35 ingestingTimer = 0;
36 indexingTimer = 0;
37 processTimer = 0;
38 }
39
40 @Override
41 public String toString() {
42 return "Bulk Ingest Process Timer(" + recordsCount + "):\tIngesting Time: "
43 + DateTimeUtil.formatTime(ingestingTimer) + "\tIndexing Time: " + DateTimeUtil.formatTime(indexingTimer)
44 + "\tTotal Process Time: " + DateTimeUtil.formatTime(processTimer);
45 }
46
47 public long getRecordsCount() {
48 return recordsCount;
49 }
50
51 public void setRecordsCount(long recordsCount) {
52 this.recordsCount = recordsCount;
53 }
54
55 public long getIngestingTimer() {
56 return ingestingTimer;
57 }
58
59 public void setIngestingTimer(long ingestingTimer) {
60 this.ingestingTimer = ingestingTimer;
61 }
62
63 public long getIndexingTimer() {
64 return indexingTimer;
65 }
66
67 public void setIndexingTimer(long indexingTimer) {
68 this.indexingTimer = indexingTimer;
69 }
70
71 public long getProcessTimer() {
72 return processTimer;
73 }
74
75 public void setProcessTimer(long processTimer) {
76 this.processTimer = processTimer;
77 }
78
79 }