FilterHandlerTime()

new FilterHandlerTime()

The filter is used to record handling time. In beforeFilter, it will record a timestamp, In afterFilter it will record a timestamp too. and then subtract two timestamps to get the handling time, and then log it.
这个filter使用来记录服务器处理时间的,在beforeFilter中会记录一下当前的时间戳, 在afterFilter中再次获取当前的时间戳,然后两个时间戳相减,得到整个处理时间,然后记录日志。
Implements:

Methods

after(err, msg, session, resp, next)

After filter
Parameters:
Name Type Description
err object
msg object
session object
resp object
next function
Implements:

before(msg, session, next)

Before filter
Parameters:
Name Type Description
msg object message
session object
next function callback Function
Implements: