Skip to main content

Metric Rate

This Eggplant Performance Test Controller REST method gets the rate 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/rates

HTTP Method

GET: Gets the rate over time of a set of metrics. Note that you must specify at least one metric name in the query data

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 completed after this time will be considered.
bucket_sizeA time interval, expressed in seconds. Returned data will be 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 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/rates?metric=DoTheTimings&metric=Action1_SearchForStuff&after_time=147409660000&bucket_size=30

Example Response

{
"2022-01-28T10:44:26.799Z": {
"Action1_SearchForStuff": 0.399,
"DoTheTimings": 0.1,
"<COMBINED>": 0.499
},
"2022-01-28T10:44:36.808Z": {
"Action1_SearchForStuff": 0.0,
"DoTheTimings": 0.599,
"<COMBINED>": 0.599
},
"2022-01-28T10:44:46.815Z": {
"Action1_SearchForStuff": 0.0,
"DoTheTimings": 0.399,
"<COMBINED>": 0.399
},
"2022-01-28T10:44:56.834Z": {
"Action1_SearchForStuff": 0.0,
"DoTheTimings": 0.499,
"<COMBINED>": 0.499
},
"2022-01-28T10:45:06.842Z": {
"Action1_SearchForStuff": 0.0,
"DoTheTimings": 0.0,
"<COMBINED>": 0.0
},
"2022-01-28T10:45:16.862Z": {
"Action1_SearchForStuff": 0.0,
"DoTheTimings": 0.0,
"<COMBINED>": 0.0
}
}