Skip to content

Commit ed7aa8a

Browse files
committed
Update Swift refinements for graph counter query
1 parent 43ef443 commit ed7aa8a

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

Sources/OpenGraph/Graph/Graph.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extension Graph {
8181
extension Graph {
8282
@_transparent
8383
@inline(__always)
84-
public var mainUpdates: Int { numericCast(counter(for: .mainThreadUpdateCount)) }
84+
public var mainUpdates: Int { numericCast(counter(for: .mainThreadUpdates)) }
8585
}
8686

8787
extension Graph {

Sources/OpenGraphCxx/Graph/OGGraph.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ uint64_t OGGraphGetCounter(OGGraphRef graph, OGCounterQueryType query) {
158158
}
159159
OG::Graph::Context& context = graph->context;
160160
switch (query) {
161-
case OGCounterQueryTypeNodeCount:
161+
case OGCounterQueryTypeNodes:
162162
return context.get_graph().get_counter_0();
163-
case OGCounterQueryTypeTransactionCount:
163+
case OGCounterQueryTypeTransactions:
164164
return context.get_graph().get_counter_1();
165-
case OGCounterQueryTypeUpdateCount:
165+
case OGCounterQueryTypeUpdates:
166166
return context.get_graph().get_counter_2();
167-
case OGCounterQueryTypeChangeCount:
167+
case OGCounterQueryTypeChanges:
168168
return context.get_graph().get_counter_3();
169169
case OGCounterQueryTypeContextID:
170170
return context.get_graph().get_counter_4();
@@ -178,7 +178,7 @@ uint64_t OGGraphGetCounter(OGGraphRef graph, OGCounterQueryType query) {
178178
return context.get_graph().get_counter_8();
179179
case OGCounterQueryTypeNeedsUpdate:
180180
return context.get_graph().get_counter_9();
181-
case OGCounterQueryTypeMainThreadUpdateCount:
181+
case OGCounterQueryTypeMainThreadUpdates:
182182
return context.get_graph().get_counter_10();
183183
default:
184184
return 0;

Sources/OpenGraphCxx/include/OpenGraph/OGCounterQueryType.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
#include <OpenGraph/OGBase.h>
99

1010
typedef OG_ENUM(uint32_t, OGCounterQueryType) {
11-
OGCounterQueryTypeNodeCount,
12-
OGCounterQueryTypeTransactionCount,
13-
OGCounterQueryTypeUpdateCount,
14-
OGCounterQueryTypeChangeCount,
11+
OGCounterQueryTypeNodes,
12+
OGCounterQueryTypeTransactions,
13+
OGCounterQueryTypeUpdates,
14+
OGCounterQueryTypeChanges,
1515
OGCounterQueryTypeContextID,
1616
OGCounterQueryTypeGraphID,
1717
OGCounterQueryTypeContextThreadUpdating,
1818
OGCounterQueryTypeThreadUpdating,
1919
OGCounterQueryTypeContextNeedsUpdate,
2020
OGCounterQueryTypeNeedsUpdate,
21-
OGCounterQueryTypeMainThreadUpdateCount,
22-
OGCounterQueryTypeNodeTotalCount,
23-
OGCounterQueryTypeSubgraphCount,
24-
OGCounterQueryTypeSubgraphTotalCount,
25-
};
21+
OGCounterQueryTypeMainThreadUpdates,
22+
OGCounterQueryTypeCreatedNodes,
23+
OGCounterQueryTypeSubgraphs,
24+
OGCounterQueryTypeCreatedSubgraphs,
25+
} OG_SWIFT_NAME(OGGraphRef.CounterQueryType);
2626

2727
#endif /* OGCounterQueryType_h */

0 commit comments

Comments
 (0)