Skip to content

Commit 27f4db5

Browse files
committed
add top_size query
1 parent e1a6a72 commit 27f4db5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

query/snapshot/src/main/java/me/hsgamer/topper/query/snapshot/SnapshotQuery.java

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ protected SnapshotQuery() {
6161
.map(index -> index + 1)
6262
.map(Object::toString)
6363
.orElse("0"));
64+
registerAction("top_size", (actor, context) ->
65+
Integer.toString(context.agent.getSnapshot().size()));
6466
}
6567

6668
protected abstract Optional<SnapshotAgent<K, V>> getAgent(@NotNull String name);

0 commit comments

Comments
 (0)