Performance Testing with Gatling

Now that we have a working web server, let’s test it out. If you’ve configured the Docker-based environment, port 8080 should be open, and you can run the server like this:

 :scala-native:httpserver ./target/scala-2.11/httpserver-out
 bind returned 0
 listen returned 0
 listening on port 8080

In this way, you should be able to access it at http://localhost:8080. We want to go beyond basic interactive testing, however. We want to stress test our server’s performance under realistic load.

Why Measure?

As I noted at the start of the chapter, implementing performant servers is hard. By testing the performance of our server, we can set a baseline for comparison to the more advanced approaches we’ll take in Part II ...

Get Modern Systems Programming with Scala Native now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.