SDK
SDK Jvm v1.x
2

getStats #

Returns statistics snapshots within a provided timestamp range. By default, snapshots are made every 10 seconds and they are stored for 1 hour.

These statistics include:

  • the number of connected users per protocol (not available for all protocols)
  • the number of ongoing requests
  • the number of completed requests since the last frame
  • the number of failed requests since the last frame

:::: tabs ::: tab Java

Copied to clipboard!
CompletableFuture<Map<String, Object>> getStats(
      Date startTime, Date stopTime)

Arguments Type Description
startTime
Date
Beginning of statistics frame set
stopTime
Date
End of statistics frame set

Return #

Returns a Map<String, Object> containing statistics snapshots within the provided range.

Usage #

Copied to clipboard!
Date startTime = new Date(1234567890);
Date stopTime = new Date(1541426610);
Map<String, Object> result = kuzzle
  .getServerController()
  .getStats(startTime, stopTime)
  .get();

::: ::: tab Kotlin

Copied to clipboard!
fun getStats(startTime: Date, stopTime: Date): CompletableFuture<Map<String, Any?>>

Arguments Type Description
startTime
Date
Beginning of statistics frame set
stopTime
Date
End of statistics frame set

Return #

Returns a Map<String, Any?> containing statistics snapshots within the provided range.

Usage #

Copied to clipboard!
val startTime = Date(1234567890000)
val stopTime = Date(1541426610000)
val result: Map<String, Any?> = kuzzle
  .serverController
  .getStats(startTime, stopTime)
  .get()

::: ::::