All Products
Search
Document Center

OnsTrendTopicInputTps

Last Updated: Mar 28, 2019

OnsTrendTopicInputTps

You can call this operation to query statistics of written messages corresponding to specified topics within a period of time.

Description

You can call this operation to obtain online message statistics corresponding to specified topics, and query the number of messages written or TPS curve within a specified period of time.

Note: If the message volume is small and messages are distributed unevenly, the data output in TPS mode may be confusing. We recommend that you query the total number of messages written.

Request parameters

Name Type Required Description
PreventCache Long Yes The parameter used for CSRF verification, which can be set to the current system time. Unit: ms
InstanceId String No The ID of the instance.
Topic String Yes The name of the topic you want to query.
BeginTime Long Yes The start time of the query period. Unit: ms.
EndTime Long Yes The end time of the query period. Unit: ms.
Period Long Yes The sampling period. Unit: minutes. Valid values: 1, 5, and 10.
Type Integer Yes The type of statistics you want to query. Valid value:
  • 0: Query the number of messages written a specified period of time.
  • 1: Query the TPS curve within a specified period of time.

Response parameters

Name Type Description
RequestId String A common parameter. Each request has a unique ID.
HelpUrl String A help link.
data Data The dataset.

Dataset definition

Name Type Description
Title String The name of the table.
Records List(StatsDataDo) The collection point information.

StatsDataDo definition

Name Type Description
X Long The horizontal axis, representing the timestamp (unit: ms).
Y Float The vertical axis, representing data (TPS or total).

Examples

For more information about sample codes, see API sample code and endpoints.