# How to best relate response time with number of requests?

**URL:** <https://community.dynatrace.com/t/how-to-best-relate-response-time-with-number-of-requests/35231>\
**Category:** Open Q&A\
**Tags:** dynatrace-managed, dynatrace-api\
**Created:** [May 21, 2022, 10:50am UTC](https://community.dynatrace.com/t/how-to-best-relate-response-time-with-number-of-requests/35231 "2022-05-21T10:50:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [May 21, 2022, 10:50am UTC](https://community.dynatrace.com/t/how-to-best-relate-response-time-with-number-of-requests/35231/1 "2022-05-21T10:50:19Z")

</div>

When we have a metric with response times, it might be an average or median for a certain period of time, like one minute, but it is calculated regarding the number of requests made.

Say, that in one minute we had 10 requests with one second, and then the next minute we had 5 requests with half a second. Considering averages, if we did an aggregation for the two minutes, we would have an average of 0.833s=(10x1+5x0.5)/15

But, if we don’t consider the number of requests, and we simply average the two minutes, we get 0.75s.

Values might vary more or less, of course…

The latter is what we get when we feed a response time into a metric in Dynatrace, and then do some type of aggregation afterwards. Is there a way to define/insert a response time metric with consideration of the quantity of requests made?

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [June 21, 2022, 6:49pm UTC](https://community.dynatrace.com/t/how-to-best-relate-response-time-with-number-of-requests/35231/2 "2022-06-21T18:49:04Z")

</div>

I have figured this one by myself&nbsp;:grin: You have to use statistic summaries for the metrics being ingested. A good description is given in [Metric ingestion protocol — Dynatrace Docs](https://www.dynatrace.com/support/help/extend-dynatrace/extend-metrics/reference/metric-ingestion-protocol#payload)

I have done statistical analysis on the data, and while my old data would not aggregate correctly, now it does 😃:dynaspin:

---

<div class="post-metadata">

**Author:** ![mosemont73](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mosemont73](https://community.dynatrace.com/u/mosemont73)\
**Post date:** [January 28, 2023, 5:46pm UTC](https://community.dynatrace.com/t/how-to-best-relate-response-time-with-number-of-requests/35231/3 "2023-01-28T17:46:05Z")

</div>

I have same issue. Can you show as an example, please?

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [January 28, 2023, 6:07pm UTC](https://community.dynatrace.com/t/how-to-best-relate-response-time-with-number-of-requests/35231/4 "2023-01-28T18:07:04Z")

</div>

First of all, for this to work, you have to ingest it via the metric ingestion protocol, with the gauge format. In the link provided before, there are examples of the gauge format.
