Elm in production: Gatling Estimator

Our team at the Finnish Broadcasting Company organizes proof-of-concept weeks once or twice a year. During these weeks, you can try out stuff you wouldn’t normally have time for in day-to-day work. Some people use the time to build new features for the team’s apps and APIs, while others study new things in a free-form way by, for example, building small applications.

During a recent PoC week, I implemented an app idea that had been brewing in my head for about a year. We use the Gatling tool for load testing. We bombard APIs with heavy traffic and see if response times stay under control (this is called a simulation). Many variables affect this testing, like the number of test users. Sometimes it’s a bit tricky to understand why, for example, a Gatling simulation takes many times longer than you’d expect based on the defined duration. It’s pretty slow to tweak variables and re-run simulations that last several minutes just to figure this out.

From this frustration, Gatling Estimator was born. With Gatling Estimator, you can adjust many key testing variables and estimate request duration. You immediately see an estimate of the simulation duration as well as the achieved RPS (requests per second). It includes charts in the spirit of Gatling reports (using elm-charts), which help build intuition.

Gatling Estimator is the first Elm application in production at the Finnish Broadcasting Company! Personally it’s the first time since 2018 that I’m writing in-production Elm at work.

Regrettably the source is not open due to the way we organise our code. I can’t share just a slice of a repository in any practical way. Any questions about the implementation are welcome, of course!

(a note on the sub-domain: getting a permission for a new top-level sub-domain would have been quite a hurdle so I settled for a *.test.yle.fi address which I can provision myself)

9 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.