SDK
SDK Dart v2.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

Future<Map<String, dynamic>> getStats(
      DateTime startTime, DateTime stopTime)

ArgumentsTypeDescription
startTime
DateTime
Begining of statistics frame set
stopTime
DateTime
End of statistics frame set

Return #

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

Usage #

DateTime startTime = new DateTime.fromMillisecondsSinceEpoch(1234567890101);
DateTime stopTime = new DateTime.fromMillisecondsSinceEpoch(1541426610304);
final result = await kuzzle
  .server
  .getStats(startTime, stopTime);