Metric Averages
This Eggplant Performance Test Controller REST method gets the average value 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/averages
HTTP Method
GET: Get the average value over time of a set of metrics. Note that you must specify at least one metric name in the query data
URL Query Parameters
Parameter | Description |
---|---|
metric | The name of a custom metric. Note that you can specify more than one metric name. |
after_time | A time, expressed in milliseconds since Jan 1st 1970. Only transactions that completed after this time will be considered. |
bucket_size | A time interval, expressed in seconds. Returned data will be resampled to this interval. |
Response Parameters
Type | Description |
---|---|
<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 average value (<float> ) of the metric at that time. |
Example Request
http:/test_controller/api/1.0/Demo%20Workspace/Demo/demoScript/metrics/averages?metric=DoTheTimings&metric=Action1_SearchForStuff&after_time=147409660000&bucket_size=30
Example Response
{
"2022-01-27T18:04:56.939Z": {
"Action1_SearchForStuff": 3.5,
"DoTheTimings": 4537.0,
"<COMBINED>": 910.2
},
"2022-01-27T18:05:06.942Z": {
"Action1_SearchForStuff": 4,
"DoTheTimings": 6037.0,
"<COMBINED>": 6037.0
},
"2022-01-27T18:05:16.957Z": {
"Action1_SearchForStuff": 5,
"DoTheTimings": 6833.25,
"<COMBINED>": 6833.25
},
"2022-01-27T18:05:26.968Z": {
"Action1_SearchForStuff": 6,
"DoTheTimings": 6675.667,
"<COMBINED>": 6675.667
},
"2022-01-27T18:05:36.984Z": {
"Action1_SearchForStuff": 7,
"DoTheTimings": 7041.0,
"<COMBINED>": 7041.0
},
"2022-01-27T18:05:47.003Z": {
"Action1_SearchForStuff": 8,
"DoTheTimings": 9,
"<COMBINED>": 17
}
}