Which library do Jetbrains IDEs use for measuring method execution time?


Recently I've run into some UI freezes in Intellij Idea. In such situation Idea creates a directory like "threadDumps-freeze-20230522-103817-IU-232.6095.10-19sec" with a report.txt file containing something like this:

java.awt.EventDispatchThread.run 13800ms
   java.awt.EventDispatchThread.pumpEvents 13800ms
    java.awt.EventDispatchThread.pumpEvents 13800ms
     java.awt.EventDispatchThread.pumpEventsForHierarchy 13800ms
      java.awt.EventDispatchThread.pumpEventsForFilter 13800ms
       java.awt.EventDispatchThread.pumpOneEventForFilters 13800ms
        com.intellij.ide.IdeEventQueue.dispatchEvent 13800ms
         com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread 13800ms

Do you know which tool creates graphs like that? It would be useful for my own application development and profiling.


1 comment

Hi Michał,

It is not a library. See: com.intellij.diagnostic.CallTreeNode#appendIndentedString. Notice that it is an internal class.


Please sign in to leave a comment.