Previous: Testing with Curl, Up: Testing and Developing Trip [Contents][Index]
Load testing can be done with curl
and ab
(Apache Bench,
usually installed with Apache 2).
curl
.
See Testing with Curl.
ab
using the session ID obtained
from the previous command:
$ ab -v 3 \ -C 'TRIP_SESSION_ID=b3571314-d5c4-4690-8164-8384fd748faa' \ http://localhost:8080/trip/app/tracks
-n 1000 -c 50
to perform 1,000 page fetches, with
a maximum of 50 concurrent requests. Add the -k
option if you
want to test keep-alive
requests. Make sure to configure the
build with the --enable-keep-alive
option.
If using keep-alive
, it’s best to limit the number of concurrent
requests to no more than the number of workers the application has been
configured to start, otherwise some requests will fail. As far as I
understand, there is no real benefit using keep-alive
these days,
so by default it is disabled in the build.