Add Lua memory reporting to redbean

This commit is contained in:
Paul Kulchenko 2021-08-12 21:48:12 -07:00
parent 6cb8e241f7
commit be0f03a23e

View file

@ -3132,6 +3132,9 @@ static char *ServeStatusz(void) {
AppendLong1("lastmeltdown", shared->lastmeltdown);
AppendLong1("workers", shared->workers);
AppendLong1("assets.n", assets.n);
#ifndef STATIC
AppendLong1("lua.memory", lua_gc(L, LUA_GCCOUNT)*1024 + lua_gc(L, LUA_GCCOUNTB));
#endif
ServeCounters();
AppendRusage("server", &shared->server);
AppendRusage("children", &shared->children);