Skip to main content

Get Metrics Totals

This Eggplant Performance Test Controller REST method gets the total passed and failed counts 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/totals

HTTP Method

GET: Get the total passed and failed counts 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 are completed after this time are 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 - two each - one for "passed", one for "failed". Each <metric_name> object contains the total number of times (<integer>) the metric has passed/failed at that time.

Example Request

http://localhost:5001/test_controller/api/1.0/Demo%20Workspace/Demo/demoScript/metrics/totals?metric=DoTheTimings&metric=Action1_SearchForStuff&after_time=147409660000&bucket_size=30

Example Response

{
"2022-02-01T11:48:30.000Z": {
"Action1_SearchForStuff (passed)": 14.0,
"DoTheTimings (passed)": 5670.0,
"<COMBINED> (passed)": 5684.0,
"Action1_SearchForStuff (failed)": 0.0,
"DoTheTimings (failed)": 0.0,
"<COMBINED> (failed)": 0.0
},
"2022-02-01T11:49:00.000Z": {
"Action1_SearchForStuff (passed)": 14.0,
"DoTheTimings (passed)": 81896.0,
"<COMBINED> (passed)": 81910.0,
"Action1_SearchForStuff (failed)": 0.0,
"DoTheTimings (failed)": 0.0,
"<COMBINED> (failed)": 0.0
},
"2022-02-01T11:49:30.000Z": {
"Action1_SearchForStuff (passed)": 32.0,
"DoTheTimings (passed)": 164337.0,
"<COMBINED> (passed)": 164369.0,
"Action1_SearchForStuff (failed)": 0.0,
"DoTheTimings (failed)": 0.0,
"<COMBINED> (failed)": 0.0
},
"2022-02-01T11:50:00.000Z": {
"Action1_SearchForStuff (passed)": 54.0,
"DoTheTimings (passed)": 250329.0,
"<COMBINED> (passed)": 250383.0,
"Action1_SearchForStuff (failed)": 0.0,
"DoTheTimings (failed)": 0.0,
"<COMBINED> (failed)": 0.0
},
"2022-02-01T11:50:30.000Z": {
"Action1_SearchForStuff (passed)": 80.0,
"DoTheTimings (passed)": 327606.0,
"<COMBINED> (passed)": 327686.0,
"Action1_SearchForStuff (failed)": 0.0,
"DoTheTimings (failed)": 0.0,
"<COMBINED> (failed)": 0.0
},
"2022-02-01T11:51:00.000Z": {
"Action1_SearchForStuff (passed)": 80.0,
"DoTheTimings (passed)": 401473.0,
"<COMBINED> (passed)": 401553.0,
"Action1_SearchForStuff (failed)": 0.0,
"DoTheTimings (failed)": 0.0,
"<COMBINED> (failed)": 0.0
},
"2022-02-01T11:51:30.000Z": {
"Action1_SearchForStuff (passed)": 80.0,
"DoTheTimings (passed)": 410078.0,
"<COMBINED> (passed)": 410158.0,
"Action1_SearchForStuff (failed)": 0.0,
"DoTheTimings (failed)": 0.0,
"<COMBINED> (failed)": 0.0
}
}