Performance Testing for HTTP Client libraries

Let’s say I have made a Go Client library for accessing some API and named it V1. I made some changes to it to improve it and call it V2.

Now, I want to make sure whether V2 is performing better than V1 or not.

How can I do performance testing or benchmarking for HTTP Client libraries?

Thanks in advance!

Jmeter?

net/http/httptest and benchmark

Define what you mean by “performing better.”

If you mean processing more requests/second than v1, then write a program that makes random (but valid, or perhaps a combination of valid and invalid) requests to v1 and then run it against both v1 and v2 to see what the minimum time is.

If by “better,” you mean faster responses, then perhaps do the same thing at the same rate and calculate the differences in time between the submission of a request to receiving its response and find out which API has the lowest difference between those times.