-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathStatistics.java
More file actions
77 lines (58 loc) · 1.5 KB
/
Statistics.java
File metadata and controls
77 lines (58 loc) · 1.5 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package com.redislabs.redisgraph;
public interface Statistics {
/**
* Different Statistics labels
*/
enum Label{
LABELS_ADDED("Labels added"),
INDICES_ADDED("Indices created"),
INDICES_DELETED("Indices deleted"),
NODES_CREATED("Nodes created"),
NODES_DELETED("Nodes deleted"),
RELATIONSHIPS_DELETED("Relationships deleted"),
PROPERTIES_SET("Properties set"),
RELATIONSHIPS_CREATED("Relationships created"),
CACHED_EXECUTION("Cached execution"),
QUERY_INTERNAL_EXECUTION_TIME("Query internal execution time");
private final String text;
Label(String text) {
this.text = text;
}
@Override
public String toString() {
return this.text;
}
/**
* Get a Label by label text
*
* @param value label text
* @return the matching Label
*/
public static Label getEnum(String value) {
for(Label v : values()) {
if(v.toString().equalsIgnoreCase(value)) return v;
}
return null;
}
public String getText() {
return text;
}
}
/**
* Retrieves the relevant statistic
*
* @param label the requested statistic label
* @return a String representation of the specific statistic or null
*/
String getStringValue(Statistics.Label label);
int nodesCreated();
int nodesDeleted();
int indicesAdded();
int indicesDeleted();
int labelsAdded();
int relationshipsDeleted();
int relationshipsCreated();
int propertiesSet();
String queryExecutionTime();
boolean cachedExecution();
}