pyramid-sveltekit-benchmark Svelte Themes

Pyramid Sveltekit Benchmark

A pyramid / sveltekit benchmark

Benchmark python/pyramid node/sveltekit

Measures

For the python/sveltekit process we do :

while true; do sleep 2; top -b -n 1 | awk 'NR>1 && $1 == 30002 {print strftime("%T"), $1, $9, $10}' | tee -a server.txt; done

For the postgreql docker container :

while true; do docker stats --no-stream | grep postgresql | awk '{print strftime("%T"),$3, $7}'| tee -a postgresql.txt; done

Injector

For python it is ajax :

ab -n 10000 -c 4 -p login.json -T 'application/json'  192.168.1.3:5173/api/signin

with login.json :

{"email":"[email protected]","password":"pass"}

For svelte we have to post the form

$ ab -n 10  -p login.form -T 'application/x-www-form-urlencoded' -H 'Origin: http://192.168.1.3:3000'  http://192.168.1.3:3000/

with login.form :

[email protected]&password=pass

It was not working because of the end of line 0a line feed character. We had to remove it with :

$ truncate -s -1 login.form

Apps

For the pyramid app to work with frontend svelte and backend python we've added an nginx reverse proxy with :

root /home/dev/src/iroco-app/build; # the front build folder
location /api {
    proxy_pass http://localhost:5000;
    proxy_cookie_domain localhost 192.168.1.3;
}

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes