Analytics Server Issue: avg(total_response_time_ is fetching global-avg-total_response_time

Not applicable

Hello All,

I am trying to fetch the average of total_response_time but apigee is fetching me global average of total response time.

Here is the query part of the URL:

select=avg(total_response_time)&timeRange=1/1/2015+00:00:00~9/15/2015+00:00:00&timeUnit=day

Here is the output:

{ "environments" : [ { "dimensions" : [ { "metrics" : [ { "name" : "global-avg-total_response_time", "values" : [ "1248.7" ] }, { "name" : "avg(total_response_time)", "values" : [ { "timestamp" : 1442188800000, "value" : "1250.5" }, { "timestamp" : 1441929600000, "value" : "1320.0" }, { "timestamp" : 1441843200000, "value" : "0.0" }, { "timestamp" : 1441670400000, "value" : "1651.5" }, { "timestamp" : 1439942400000, "value" : "954.0" } ] } ], "name" : "##############" }, { "metrics" : [ { "name" : "global-avg-total_response_time", "values" : [ "23131.666666666668" ] }, { "name" : "avg(total_response_time)", "values" : [ { "timestamp" : 1442188800000, "value" : "28.0" }, { "timestamp" : 1441929600000, "value" : "34683.5" }, { "timestamp" : 1441843200000, "value" : "0.0" }, { "timestamp" : 1441670400000, "value" : "0.0" }, { "timestamp" : 1439942400000, "value" : "0.0" } ] } ], "name" : "###############" }, { "metrics" : [ { "name" : "global-avg-total_response_time", "values" : [ "91.0" ] }, { "name" : "avg(total_response_time)", "v

I don't need global average of total response time. I just want to capture total_response_time average.Can somebody please help me with this?

0 1 219
1 REPLY 1

Not applicable

Hello Sadiq, what you are seeing is not an error. When the API has enough information about the field and the aggregated functions you are using, it will try to calculate the global value for them, that is, if you ask for average of response time, it will calculate the average across the full range you provided.

This value is the one that you see under "global-*" name. If you look at the result, there is also the one with the values per each point in time, named "avg(total_response_time)".