Reputation: 45
In jprofiler how does the time in CPU views and Databases(jdbc/JPA) in call tree view coorelate with each other? How can i see if the bottleneck is at database calls or in java code
Is the time shown in call tree section of CPU views cumulative time of the whole request and include the time taken by JPA and JDBC calls or is it only of CPU and does not include IO times. Is the total time of request is what i seen in call tree section of CPU views or is it a sum total of call tree timings for database and CPU views
Question on different lines: I see a significant amount of times taken in java core classes like BigDecimal. Double.value of, Calendar.getInstance. They are a lot of invocations of these methods from my application. Also if I add these classes in my list of ignored classes in filter settings the overall time of my method which calls these classes is reduced. So can I assume that the large time reported in these methods was actually overhead introduced by Jprofiler.
Upvotes: 3
Views: 1545
Reputation: 47965
Is the time shown in call tree section of CPU views cumulative time of the whole request and include the time taken by JPA and JDBC calls
Only if you set the "Thread status" selector at the top of the CPU views to "All times". By default it's set to "Runnable" and does not include the time a socket waits for a database call to complete.
So can I assume that the large time reported in these methods was actually overhead introduced by Jprofiler.
With instrumentation, overhead can get very high in algorithmic code, especially because it reduces the possibility for the hot spot compiler to eliminate method calls. You would either have to adjust your filters to only instrument "high-level" classes or switch to "Sampling" in order to get realistic time measurements.
Upvotes: 2