Skip to main content

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

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. 1 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 - two each - one for "passed", one for "failed". Each <metric_name> object contains the 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/counts?metric=DoTheTimings&metric=Action1_SearchForStuff&after_time=147409660000&bucket_size=30

Example Response

{
"2022-01-28T10:44:26.799Z": {
"Action1_SearchForStuff (passed)": 4.0,
"DoTheTimings (passed)": 1.0,
"<COMBINED> (passed)": 5.0,
"Action1_SearchForStuff (failed)": 0.0,
"DoTheTimings (failed)": 0.0,
"<COMBINED> (failed)": 0.0
},
"2022-01-28T10:44:36.808Z": {
"Action1_SearchForStuff (passed)": 4.0,
"DoTheTimings (passed)": 7.0,
"<COMBINED> (passed)": 11.0,
"Action1_SearchForStuff (failed)": 0.0,
"DoTheTimings (failed)": 0.0,
"<COMBINED> (failed)": 0.0
},
"2022-01-28T10:44:46.815Z": {
"Action1_SearchForStuff (passed)": 4.0,
"DoTheTimings (passed)": 11.0,
"<COMBINED> (passed)": 15.0,
"Action1_SearchForStuff (failed)": 0.0,
"DoTheTimings (failed)": 0.0,
"<COMBINED> (failed)": 0.0
},
"2022-01-28T10:44:56.834Z": {
"Action1_SearchForStuff (passed)": 4.0,
"DoTheTimings (passed)": 16.0,
"<COMBINED> (passed)": 20.0,
"Action1_SearchForStuff (failed)": 0.0,
"DoTheTimings (failed)": 0.0,
"<COMBINED> (failed)": 0.0
},
"2022-01-28T10:45:06.842Z": {
"Action1_SearchForStuff (passed)": 4.0,
"DoTheTimings (passed)": 16.0,
"<COMBINED> (passed)": 20.0,
"Action1_SearchForStuff (failed)": 0.0,
"DoTheTimings (failed)": 0.0,
"<COMBINED> (failed)": 0.0
},
"2022-01-28T10:45:16.862Z": {
"Action1_SearchForStuff (passed)": 4.0,
"DoTheTimings (passed)": 16.0,
"<COMBINED> (passed)": 20.0,
"Action1_SearchForStuff (failed)": 0.0,
"DoTheTimings (failed)": 0.0,
"<COMBINED> (failed)": 0.0
}
}