Eggplant Performance Test Controller:
GET Metric Counts Method
This method gets the cumulative count 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/counts
HTTP Method
GET: Gets the cumulative count 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. 1 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
The response will be an object where the entries are timestamps. For each timestamp, there will be an object specifying the number of times the metric had passed and failed at this point in time.
Example Request
http://localhost:5001/test_controller/api/1.0/Demo%20Workspace/Demo/demoScript/metrics/counts?metric=widgetsCreated&bucket_size=30
Example Response
{
"2016-09-17T10:12:00.000Z": {
"widgetsCreated (passed)": 1,
"<COMBINED> (passed)": 1,
"widgetsCreated (failed)": 0,
"<COMBINED> (failed)": 0
},
"2016-09-17T10:12:30.000Z": {
"widgetsCreated (passed)": 2,
"<COMBINED> (passed)": 2,
"widgetsCreated (failed)": 0,
"<COMBINED> (failed)": 0
},
"2016-09-17T10:13:00.000Z": {
"widgetsCreated (passed)": 2,
"<COMBINED> (passed)": 2,
"widgetsCreated (failed)": 0,
"<COMBINED> (failed)": 0
},
"2016-09-17T10:13:30.000Z": {
"widgetsCreated (passed)": 3,
"<COMBINED> (passed)": 3,
"widgetsCreated (failed)": 0,
"<COMBINED> (failed)": 0
}
}