Increment Tool
We’re overhauling Dgraph’s docs to make them clearer and more approachable. If you notice any issues during this transition or have suggestions, please let us know.
The dgraph increment
tool increments a counter value via transactions. The
increment tool can be used as a health check that an Alpha is able to service
transactions for both queries and mutations.
Example
Increment the default predicate (counter.val
) once. If the predicate doesn’t
yet exist, then it is created starting at counter 0.
Increment the counter predicate against the Alpha running at address --alpha
(default: localhost:9080
):
Increment the counter predicate specified by --pred
(default: counter.val
):
Run a read-only query for the counter predicate and doesn’t run a mutation to increment it:
Run a best-effort query for the counter predicate and doesn’t run a mutation to increment it:
Run the increment tool 1000 times every 1 second:
Increment tool output
Was this page helpful?