mule ESB中web服务的响应时间?

mule ESB中web服务的响应时间?,mule,mule-esb,Mule,Mule Esb,如何在MULE ESB平台上获取web服务POST请求的响应时间 您可以使用变量设置当前时间,然后在发出请求或连接器操作后计算响应时间 使用dataweave在响应变量中设置当前时间 dw::util::Timer::currentMilliseconds() 稍后使用转换器计算响应时间,在该转换器中将转换结果设置为responseTime %dw 2.0 import dw::util::Timer output application/json --- Timer::currentMill

如何在MULE ESB平台上获取web服务POST请求的响应时间

您可以使用变量设置当前时间,然后在发出请求或连接器操作后计算响应时间

使用dataweave在响应变量中设置当前时间

dw::util::Timer::currentMilliseconds()
稍后使用转换器计算响应时间,在该转换器中将转换结果设置为responseTime

%dw 2.0
import dw::util::Timer
output application/json
---
Timer::currentMilliseconds() - vars.responseTime

感谢上面的解决方案,但是我们在rest服务中是否有任何内置组件/参数,在处理请求时默认提供响应时间?