Conducted a 5-minute load test with 30 users using JMeter for a single API. Analyzed response times in Datadog during same duration. The response time metrics for JMeter and Datadog are as follows:
JMeter: Average - 456ms, 95th Percentile - 724ms
Datadog: Average - 7ms, 95th Percentile - 15ms
Repeated the test multiple times, consistently obtaining similar results. Currently investigating the substantial differences in values between JMeter and Datadog. Seeking clarity on which set of metrics to prioritize for performance analysis of the API.
When this API becomes the part of web page, which response time needs to be considered.
First of all get familiarized with the definition of API as it's not very clear what you're talking about.
My expectation is that Datadog measures only internal processing of the request while JMeter includes the following:
When the "API" becomes a part of the web page you need to ensure that JMeter is configured to behave like a real browser and measure the time required to get the whole webpage which may include calling mulpitle "APIs" and embedded resources. This is the correct way of assessing the web "page" performance (unless you're responsible for the single "API" endpoint)