Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.11
2.6.12
7 changes: 7 additions & 0 deletions docker/entity-api/nginx/conf.d/entity-api.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ server {

include uwsgi_params;
uwsgi_pass uwsgi://localhost:5000;

uwsgi_connect_timeout 10s;
uwsgi_send_timeout 90;
uwsgi_read_timeout 90;

uwsgi_buffer_size 32k;
uwsgi_buffers 4 32k;
}

}
7 changes: 7 additions & 0 deletions src/uwsgi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ log-master=true
# Master with 12 worker processes (based on CPU number)
master = true
processes = 12
max-requests = 2000

# Enable the multithreading within uWSGI
# Launch the application across multiple threads inside each process
Expand All @@ -26,3 +27,9 @@ vacuum = true

# Ensure compatibility with init system
die-on-term = true

listen = 512

stats = localhost:9191

stats-http = true
21 changes: 21 additions & 0 deletions test/locust_test/get_entity_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from locust import HttpUser, task, constant
import json
import random
import os
from dotenv import load_dotenv

load_dotenv()
with open("ids.json") as f:
valid_ids = json.load(f)

class GetEntityUser(HttpUser):
wait_time = constant(0)
token = os.getenv("TOKEN")

@task
def hit_authenticated_endpoint(self):
entity_id = random.choice(valid_ids)
headers = {"Authorization": f"Bearer {self.token}"}
self.client.get(f"/entities/{entity_id}", headers=headers)


21 changes: 21 additions & 0 deletions test/locust_test/reindex_entity_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from locust import HttpUser, task, constant
import json
import random
import os
from dotenv import load_dotenv

load_dotenv()
with open("ids.json") as f:
valid_ids = json.load(f)

class GetEntityUser(HttpUser):
wait_time = constant(0)
token = os.getenv("TOKEN")

@task
def hit_authenticated_endpoint(self):
entity_id = random.choice(valid_ids)
headers = {"Authorization": f"Bearer {self.token}"}
self.client.put(f"/reindex/{entity_id}", headers=headers)


Loading