We have an API which returns xml results based on queries, the server is running Tomcat 7.0.53. I've been trying to determine how much time is spent processing and serving the request, and there is a significant amount of time (104ms, on average) that I can't account for during the application execution. One thing I have thought of is that Tomcat might be using up some or all of this time before and after executing the relevant web app.
My question is: what are the possible causes of this unaccounted time? Does anyone know of methods or tools that I can use in order to analyze the time Tomcat is spending loading classes, assigning threads, etc?
By the way, the time was determined by comparing the total time spent in the application vs the TTFB reported by Chrome Dev Tools.