Skip to main content

Metric Total Rates

This Eggplant Performance Test Controller REST method gets the total rates over time of a set of metrics. Note that you must specify at least one metric name in the query data.

URL

/test_controller/api/1.0/<workspace>/<project>/<test>/metrics/total_rates

HTTP Method

GET: Get the total rates over time of a set of metrics.

URL Query Parameters

ParameterDescription
metricThe name of a custom metric. Note that you can specify more than one metric name.
after_timeA time, expressed in milliseconds since Jan 1st 1970. Only transactions that are completed after this time are considered.
bucket_sizeA time interval, expressed in seconds. Returned data are resampled to this interval.

Response Parameters

TypeDescription
<timestamp>A timestamp object with a <collection> object. The <collection> object contains a list of one or more <metric_name> objects. Each <metric_name> object contains the total rate (<float>) at which the metric was occurring at that time.

Example Request

http://localhost:5001/test_controller/api/1.0/Demo%20Workspace/Demo/demoScript/metrics/total_rates?metric=widgetsCreated&metric=widgetsDestroyed&bucket_size=30

Example Response

{
"2022-01-28T10:44:26.799Z": {
"Action1_SearchForStuff": 1.398,
"DoTheTimings": 638.595,
"<COMBINED>": 639.994
},
"2022-01-28T10:44:36.808Z": {
"Action1_SearchForStuff": 0.0,
"DoTheTimings": 2468.09,
"<COMBINED>": 2468.09
},
"2022-01-28T10:44:46.815Z": {
"Action1_SearchForStuff": 0.0,
"DoTheTimings": 2551.785,
"<COMBINED>": 2551.785
},
"2022-01-28T10:44:56.834Z": {
"Action1_SearchForStuff": 0.0,
"DoTheTimings": 2742.045,
"<COMBINED>": 2742.045
}
}