Benchmarking a django app with many concurrent requests like ab

I have a django application on an apache server in OpenShift and want to test its performance as long as it takes to process a request (GET or POST) and return a response to the user.

I want to be able to test it by setting the number of requests for the page I am comparing and how many of them will be executed at the same time, like ab does.

I tried to use ab but cannot use it for pages that require authentication and login. Is there a tool to help me automate some of these testicles? I want the tool to be able to run outside of the django environment because I would like my employer to be able to run it from their PC.

What would you suggest? Some of the pages I want to check also do some model searches and return some results, and also load some images. I would like to be able to automate and measure them too.

+3


source to share


1 answer


If you are using the Django SessionMiddleware , ab

can test the URL-addresses that require authentication. Django uses an identifier stored in cookies (user-side) to authenticate users. An example of an ab

authenticated request:

ab -C sessionid=YourTokenID https://yourwebsite.org

      

  • sessionid

    - cookie name
  • YourTokenID

    can be found easily using browser or model django.contrib.sessions.models.Session



Literature:

+1


source







All Articles