Joan Miquel db7719ddf9 [lapis] Fix json route and update openresty to v1.19.9.1 (#6922) %!s(int64=3) %!d(string=hai) anos
..
README.md 5adeb2e489 Moving Lua frameworks %!s(int64=11) %!d(string=hai) anos
benchmark_config.json db7719ddf9 [lapis] Fix json route and update openresty to v1.19.9.1 (#6922) %!s(int64=3) %!d(string=hai) anos
config.lua 6fce84a278 WIP: Dockerify everything (#3457) %!s(int64=7) %!d(string=hai) anos
config.moon 6fce84a278 WIP: Dockerify everything (#3457) %!s(int64=7) %!d(string=hai) anos
config.toml 0096f84ee9 Config for the new toolset (#6259) %!s(int64=4) %!d(string=hai) anos
lapis.dockerfile db7719ddf9 [lapis] Fix json route and update openresty to v1.19.9.1 (#6922) %!s(int64=3) %!d(string=hai) anos
loader.lua 5adeb2e489 Moving Lua frameworks %!s(int64=11) %!d(string=hai) anos
loader.moon 5adeb2e489 Moving Lua frameworks %!s(int64=11) %!d(string=hai) anos
mime.types 5adeb2e489 Moving Lua frameworks %!s(int64=11) %!d(string=hai) anos
nginx.conf d01c97156e Lua/* remove TE dependencies [ci lang-only Lua] (#3517) %!s(int64=7) %!d(string=hai) anos
web.lua db7719ddf9 [lapis] Fix json route and update openresty to v1.19.9.1 (#6922) %!s(int64=3) %!d(string=hai) anos
web.moon 0ee1591364 Lapis: split /db and /queries into different handlers %!s(int64=11) %!d(string=hai) anos

README.md

Lapis (Nginx + Lua(jit + Lapis) Benchmark Test

The lua app is inside web.lua which is compiled using moonscript compiler from web.moon The nginx conf is inside nginx.conf Requires a nginx compiled with ngx_lua module, see openresty.org, and ngxpostgres which is bundled with openresty. Requires lapis framework installed

luarocks install lapis

Requires postgresql hostname specified as IP address, if not possible then add resolver conf to nginx.conf.

The lapis benchmark is using its ORM, and no raw queries.

Test URLs

JSON Encoding

http://localhost:8080/

Single Row Random Query

http://localhost:8080/db

Variable Row Query Test

http://localhost:8080/db?queries=2

Fortune URL

http://localhost:8080/fortunes

DB Updates URL

http://localhost:8080/update?queries=2

Plaintext URL

http://localhost:8080/plaintext