All Products
Search
Document Center

Metrics interface

Last Updated: May 08, 2020

Statistics metrics for the transactions sent by accounts

  • Function prototype
  1. public QueryNodeMetricsStatusResponse queryNodeMetricsStatus(long startTime, long endTime)
Parameter Required Type Description
startTime true long The start timestamp.
endTime true long The end timestamp.
  • Example
  1. long startTime = stringToTimeStamp("2018-10-30 01:00:00");
  2. long endTime = System.currentTimeMillis();
  3. QueryNodeMetricsStatusResponse result = sdk.getQueryService().queryNodeMetricsStatus( startTime, endTime);

Statistics metrics for the query requests sent

  • Function prototype
  1. public QueryMetricsQueryInfoResponse queryMetricsQueryInfo(long startTime, long endTime)
  2. public QueryMetricsQueryInfoResponse queryMetricsQueryInfo(long startTime, long endTime, Hash hash)
Parameter Required Type Description
startTime true long The start timestamp.
endTime true long The end timestamp.
hash false Hash The node ID.
  • Example
  1. long startTime = stringToTimeStamp("2018-10-30 01:00:00");
  2. long endTime = System.currentTimeMillis();
  3. QueryMetricsQueryInfoResponse result = sdk.getQueryService().queryMetricsMessage(startTime, endTime);

Statistics metrics for the number of transactions handled per second

  • Function prototype
  1. public QueryTpsLatencyResponse queryTpsLatency(long startTime, long endTime)
  2. public QueryTpsLatencyResponse queryTpsLatency(Hash hash, long startTime, long endTime)
Parameter Required Type Description
startTime true long The start timestamp.
endTime true long The end timestamp.
hash false Hash The node ID.
  • Example
  1. long startTime = stringToTimeStamp("2018-10-30 01:00:00");
  2. long endTime = System.currentTimeMillis();
  3. QueryTpsLatencyResponse result = sdk.getQueryService().queryTpsLatency(startTime, endTime);