Performance testing a WordPress site locally?

Why do you want to test it on localhost if this doesnt reflect your real server envirement?

You can do these kind of test (but not on localhost) with a website called https://www.blitz.io/

It shows you exactly the response times for your server, how many users it can handle till producing errors, etc.

But you need to do this with a real server, not on localhost. If you test it on localhost the result won’t say anything about the real performance on a real webserver.