Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue #503

Open
Podolyan98 opened this issue Jul 20, 2023 · 0 comments
Open

Performance issue #503

Podolyan98 opened this issue Jul 20, 2023 · 0 comments

Comments

@Podolyan98
Copy link

I configured mozilla-django-oidc according to the documentation (Installation and DRF). Then I ran the Locust test:

from locust import HttpUser, task

token = 'token123'
shift_id = 'e048f80c-56e6-465a-8b20-fe5744ec0239'

class ReadShiftsTest(HttpUser):
    @task
    def test_read_shifts(self):
        url = f'api/shifts/{shift_id}'
        headers = {
            'Authorization': f'Bearer {token}'
        }
        self.client.get(url, headers=headers)

Number of users: 100
Spawn rate (users started/second): 100
Host: http://0.0.0.0:8888

Type     Name                                                                          # reqs      # fails |    Avg     Min     Max    Med |   req/s  failures/s
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
GET      /api/shifts/e048f80c-56e6-465a-8b20-fe5744ec0239                                3509    27(0.77%) |   6894     934   92222   4400 |   13.61        0.10
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
         Aggregated                                                                      3509    27(0.77%) |   6894     934   92222   4400 |   13.61        0.10

In the end, I only got ~14 RPS. What should I do to improve performance?


  • Python 3.11.1
  • Django 3.2.6
  • SQLite
  • DRF 3.12.4
  • Locust 2.14.2
  • Keycloak 16.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant