|
9 | 9 |
|
10 | 10 | # Timing metrics
|
11 | 11 | PLANNING_TIME = Metric(
|
12 |
| - "neo4j_query_planning_time_ms", "Time taken to plan the Neo4j query." |
| 12 | + "neo4j_query_planning_time_ms", "Time taken to plan the Neo4j query.", accumulator=True, |
13 | 13 | )
|
14 | 14 | PROCESSING_TIME = Metric(
|
15 |
| - "neo4j_query_processing_time_ms", "Time taken to execute the Neo4j query." |
| 15 | + "neo4j_query_processing_time_ms", "Time taken to execute the Neo4j query.", accumulator=True, |
16 | 16 | )
|
17 | 17 | TOTAL_TIME = Metric(
|
18 |
| - "neo4j_query_total_time_ms", "Total time taken to execute the Neo4j query." |
| 18 | + "neo4j_query_total_time_ms", "Total time taken to execute the Neo4j query.", accumulator=True, |
19 | 19 | )
|
20 | 20 | APOC_TIME = Metric(
|
21 |
| - "neo4j_query_apoc_time_ms", "Time taken to execute the Neo4j query using APOC." |
| 21 | + "neo4j_query_apoc_time_ms", "Time taken to execute the Neo4j query using APOC.", accumulator=True, |
22 | 22 | )
|
23 | 23 |
|
24 | 24 | # Write metrics
|
25 | 25 | NODES_CREATED = Metric(
|
26 | 26 | "neo4j_query_write_metrics_nodes_created",
|
27 | 27 | "Number of nodes created in the Neo4j query.",
|
| 28 | + accumulator=True, |
28 | 29 | )
|
29 | 30 | NODES_DELETED = Metric(
|
30 | 31 | "neo4j_query_write_metrics_nodes_deleted",
|
31 | 32 | "Number of nodes deleted in the Neo4j query.",
|
| 33 | + accumulator=True, |
32 | 34 | )
|
33 | 35 | RELATIONSHIPS_CREATED = Metric(
|
34 | 36 | "neo4j_query_write_metrics_relationships_created",
|
35 | 37 | "Number of relationships created in the Neo4j query.",
|
| 38 | + accumulator=True, |
36 | 39 | )
|
37 | 40 | RELATIONSHIPS_DELETED = Metric(
|
38 | 41 | "neo4j_query_write_metrics_relationships_deleted",
|
39 | 42 | "Number of relationships deleted in the Neo4j query.",
|
| 43 | + accumulator=True, |
40 | 44 | )
|
41 | 45 | PROPERTIES_SET = Metric(
|
42 | 46 | "neo4j_query_write_metrics_properties_set",
|
43 | 47 | "Number of properties set in the Neo4j query.",
|
| 48 | + accumulator=True, |
44 | 49 | )
|
45 | 50 | LABELS_ADDED = Metric(
|
46 | 51 | "neo4j_query_write_metrics_labels_added",
|
47 | 52 | "Number of labels added in the Neo4j query.",
|
| 53 | + accumulator=True, |
48 | 54 | )
|
49 | 55 | LABELS_REMOVED = Metric(
|
50 | 56 | "neo4j_query_write_metrics_labels_removed",
|
51 | 57 | "Number of labels removed in the Neo4j query.",
|
| 58 | + accumulator=True, |
52 | 59 | )
|
53 | 60 | CONSTRAINTS_ADDED = Metric(
|
54 | 61 | "neo4j_query_write_metrics_constraints_added",
|
55 | 62 | "Number of constraints added in the Neo4j query.",
|
| 63 | + accumulator=True, |
56 | 64 | )
|
57 | 65 | CONSTRAINTS_REMOVED = Metric(
|
58 | 66 | "neo4j_query_write_metrics_constraints_removed",
|
59 | 67 | "Number of constraints removed in the Neo4j query.",
|
| 68 | + accumulator=True, |
60 | 69 | )
|
61 | 70 | INDEXES_ADDED = Metric(
|
62 | 71 | "neo4j_query_write_metrics_indexes_added",
|
63 | 72 | "Number of indexes added in the Neo4j query.",
|
| 73 | + accumulator=True, |
64 | 74 | )
|
65 | 75 | INDEXES_REMOVED = Metric(
|
66 | 76 | "neo4j_query_write_metrics_indexes_removed",
|
67 | 77 | "Number of indexes removed in the Neo4j query.",
|
| 78 | + accumulator=True, |
68 | 79 | )
|
69 | 80 |
|
70 | 81 | # APOC specific metrics
|
71 | 82 | WAS_TERMINATED = Metric(
|
72 |
| - "neo4j_query_was_terminated", "Whether the Neo4j query was terminated." |
| 83 | + "neo4j_query_was_terminated", "Whether the Neo4j query was terminated.", accumulator=True, |
| 84 | +) |
| 85 | +RETRIES = Metric( |
| 86 | + "neo4j_query_retries", "Number of retries in the Neo4j query.", accumulator=True |
73 | 87 | )
|
74 |
| -RETRIES = Metric("neo4j_query_retries", "Number of retries in the Neo4j query.") |
75 | 88 |
|
76 | 89 | # Error tracking
|
77 | 90 | ERROR_MESSAGES = Metric(
|
78 |
| - "neo4j_query_error_messages", "Number of error messages in the Neo4j query." |
| 91 | + "neo4j_query_error_messages", |
| 92 | + "Number of error messages in the Neo4j query.", |
| 93 | + accumulator=True, |
79 | 94 | )
|
80 | 95 |
|
81 | 96 |
|
|
0 commit comments