This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def my_excepthook(exc_type, exc_value, tb): | |
print 'My Excepthook:' | |
# traceback display: see tb_printinternal from cpython source | |
print ' Traceback (most recent call last):' | |
while tb: | |
filename = tb.tb_frame.f_code.co_filename | |
name = tb.tb_frame.f_code.co_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Trace request context exclusively within Lua projects | |
-- executed by the Lua-nginx-module | |
-- | |
-- The timer context is not available within functions triggered by | |
-- ngx.timer.at(). However, you can easily make adjustments to this file to | |
-- enable it. | |
-- | |
-- In your lua source file: | |
-- require("bt").init_hook() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
run it by this command: | |
$ resty --shdict "kong_dns_cache 10m" --shdict "kong_dns_cache_ipc 10m" ./perf.lua | |
]] | |
pcall(require, "luarocks.loader") | |
require("kong.globalpatches")() | |
local json = require("cjson").encode |
OlderNewer