Add redbean OnLogLatency hook (#495)

This commit is contained in:
Paul Kulchenko 2022-07-18 20:17:14 -07:00 committed by GitHub
parent 6598940d8a
commit 574eba8352
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 5 deletions

View file

@ -534,6 +534,12 @@ HOOKS
each time redbean accepts a new client connection. If it returns
`true`, redbean will close the connection without calling fork.
OnLogLatency(reqtimeus:int,contimeus:int)
If this function is defined it'll be called from the main process
each time redbean completes handling of a request, but before the
response is sent. The handler received the time (in µs) since the
request handling and connection handling started.
OnProcessCreate(pid:int,ip:int,port:int,serverip:int,serverport:int)
If this function is defined it'll be called from the main process
each time redbean forks a connection handler worker process. The