0

为啥 spring 通过拦截器记录的接口处理时间和浏览器记录的 Waiting(TTFB)时间差距这么...

 2 years ago
source link: https://www.v2ex.com/t/801875
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  程序员

为啥 spring 通过拦截器记录的接口处理时间和浏览器记录的 Waiting(TTFB)时间差距这么大

  shadowfish0 · 1 小时 39 分钟前 · 81 次点击

我在拦截器 preHandle 里记录了调用开始时间,在 afterCompletion 里计算总调用时间,用的 System.nanoTime(),结果日志显示这里只花了 42ms,但是调试工具里显示的 Waiting(TTFB)有 176ms,太诡异了,摸不着头脑


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK