mirror of https://github.com/LemmyNet/lemmy.git
Merge branch 'dev' into r2d2_actix_pooling
commit
c0136a9f34
|
@ -68,8 +68,7 @@ server {
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
if ($request_uri ~ \.(?:ico|gif|jpe?g|png|webp|bmp|mp4)$) {
|
if ($request_uri ~ \.(?:ico|gif|jpe?g|png|webp|bmp|mp4)$) {
|
||||||
add_header Cache-Control "public";
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||||
expires max;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
declare -a arr=(
|
||||||
|
"https://mastodon.social/"
|
||||||
|
"https://peertube.social/"
|
||||||
|
"https://dev.lemmy.ml/"
|
||||||
|
"https://dev.lemmy.ml/feeds/all.xml"
|
||||||
|
"https://dev.lemmy.ml/.well-known/nodeinfo"
|
||||||
|
"https://fediverse.blog/.well-known/nodeinfo"
|
||||||
|
)
|
||||||
|
|
||||||
|
## now loop through the above array
|
||||||
|
for i in "${arr[@]}"
|
||||||
|
do
|
||||||
|
ab -c 10 -t 10 "$i" > out.abtest
|
||||||
|
grep "Server Hostname:" out.abtest
|
||||||
|
grep "Document Path:" out.abtest
|
||||||
|
grep "Requests per second" out.abtest
|
||||||
|
grep "(mean, across all concurrent requests)" out.abtest
|
||||||
|
grep "Transfer rate:" out.abtest
|
||||||
|
echo "---"
|
||||||
|
done
|
||||||
|
|
||||||
|
rm *.abtest
|
|
@ -8,6 +8,9 @@ psql -qAt -U lemmy -f explain.sql > user_view.json
|
||||||
echo "explain (analyze, format json) select * from post_view where user_id is null order by hot_rank desc" > explain.sql
|
echo "explain (analyze, format json) select * from post_view where user_id is null order by hot_rank desc" > explain.sql
|
||||||
psql -qAt -U lemmy -f explain.sql > post_view.json
|
psql -qAt -U lemmy -f explain.sql > post_view.json
|
||||||
|
|
||||||
|
echo "explain (analyze, format json) select * from post" > explain.sql
|
||||||
|
psql -qAt -U lemmy -f explain.sql > post.json
|
||||||
|
|
||||||
echo "explain (analyze, format json) select * from comment_view where user_id is null" > explain.sql
|
echo "explain (analyze, format json) select * from comment_view where user_id is null" > explain.sql
|
||||||
psql -qAt -U lemmy -f explain.sql > comment_view.json
|
psql -qAt -U lemmy -f explain.sql > comment_view.json
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue