[undertow-dev] Does record-request-start-time really impact performance?

Matt Solnit msolnit at soasta.com
Thu Mar 9 11:43:03 EST 2017


Hi everyone.  I'd like to add request duration to our HTTP access log, and
found the "record-request-start-time" setting in the documentation.

The documentation says "This has a small but measurable performance
impact."  But is that really true?  From what I can see in the code, all
it's doing is calling System.nanoTime().

Chasing this led me to a lot of Google searching on nanoTime() itself, and
its performance.  There's a lot of out-dated information out there,
especially with regard to Linux.  From what I can see in the Java source,
it's using clock_gettime(CLOCK_MONOTONIC), and various sources say this is
plenty fast:

https://upvoid.com/devblog/2014/05/linux-timers/ (note: this site has an
expired certificate as of 2/20, so you'll get a browser complaint)
http://stackoverflow.com/questions/38779763/linux-times-or-clock-gettimeclock-monotonic-which-one-is-faster#comment64948211_38779763

Has anyone measured this at the Undertow level, to see whether
"record-request-start-time" really affects performance?

-- Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20170309/8a0d04cc/attachment.html 


More information about the undertow-dev mailing list