Tor Hveem 0ee1591364 Lapis: split /db and /queries into different handlers 11 years ago
..
README.md 5adeb2e489 Moving Lua frameworks 11 years ago
__init__.py 5adeb2e489 Moving Lua frameworks 11 years ago
benchmark_config 0ee1591364 Lapis: split /db and /queries into different handlers 11 years ago
config.lua a988d43a3a Lapis: Use pgmoon postgresql backend 11 years ago
config.moon a988d43a3a Lapis: Use pgmoon postgresql backend 11 years ago
install.sh 959b4887f7 Move lapis.sh to lua.sh 11 years ago
loader.lua 5adeb2e489 Moving Lua frameworks 11 years ago
loader.moon 5adeb2e489 Moving Lua frameworks 11 years ago
mime.types 5adeb2e489 Moving Lua frameworks 11 years ago
nginx.conf 38e3bfce16 Cleanup openresty 11 years ago
setup.py a988d43a3a Lapis: Use pgmoon postgresql backend 11 years ago
source_code 5adeb2e489 Moving Lua frameworks 11 years ago
web.lua 0ee1591364 Lapis: split /db and /queries into different handlers 11 years ago
web.moon 0ee1591364 Lapis: split /db and /queries into different handlers 11 years ago

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