@@ -22,23 +22,23 @@ public class ProcessParser {
22
22
};
23
23
24
24
public static void parseSummary (String text , OperationMetrics metrics ) {
25
- Map <String , Integer > map = parse (text == null ? "{}" : text );
25
+ Map <String , Long > map = parse (text == null ? "{}" : text );
26
26
27
27
for (ServerMetrics m : ServerMetrics .values ()) {
28
28
metrics .updateMetric (m , -1 );
29
29
}
30
30
31
31
for (int i = 0 ; i < SUMMARY_FIELDS .length ; i ++) {
32
32
String field = SUMMARY_FIELDS [i ];
33
- Integer value = map .get (field );
33
+ Long value = map .get (field );
34
34
if (value != null ) {
35
35
metrics .updateMetric (SUMMARY_METRICS [i ], value );
36
36
}
37
37
}
38
38
}
39
39
40
40
41
- public static Map <String , Integer > parse (String json ) {
41
+ public static Map <String , Long > parse (String json ) {
42
42
if (json == null ) {
43
43
throw new IllegalArgumentException ("json is null" );
44
44
}
@@ -50,7 +50,7 @@ public static Map<String, Integer> parse(String json) {
50
50
throw new IllegalArgumentException ("JSON must start with '{' and end with '}'" );
51
51
}
52
52
53
- Map <String , Integer > result = new HashMap <>();
53
+ Map <String , Long > result = new HashMap <>();
54
54
55
55
String content = json .substring (1 , json .length () - 1 ).trim ();
56
56
if (content .isEmpty ()) {
@@ -79,7 +79,7 @@ public static Map<String, Integer> parse(String json) {
79
79
}
80
80
81
81
try {
82
- int value = Integer . parseInt (valueStr );
82
+ long value = Long . parseLong (valueStr );
83
83
result .put (key , value );
84
84
} catch (NumberFormatException e ) {
85
85
// ignore error
0 commit comments