Call Stack
Tree provides 3 wonderful benefits:
- One simplified view
- Performance Optimization
- Accurate Smoke Test
Let’s
discuss them in detail in this article.
1. One
simplified view
Thread dumps
are the snapshot of all threads running in the application at given moment.
Thread dump will have hundreds/thousands of application threads. It would be
hard to scroll through every single line of the stack trace in every single
thread. Call Stack Tree consolidates all the threads stack trace into one
single tree and gives you one single view. It makes the thread dumps navigation
much simpler and easier. Below is the sample call stack tree generated
by fastThread.io.
Fig 1: Call stack Tree
You can keep
drilling down to see code execution path. Fig 2 shows the drilled down version
of a particular branch in the Call Stack Tree diagram.
Fig 2: Drilled down Call Stack Tree
Call Stack
Tree shows you the class name, method name, and line of the code that has been
executed and the number of threads that have executed the line of code.
Fig 3: A
single element from Call Stack Tree
From the
above element in the Call Stack Tree, you can identify that call() method
in buggyCompanyCallable.java is executed by 9 threads.
2.
Performance Optimization
Methods that
are executed by the most number of threads make up the critical code path of
your application. Call Stack Tree provides you the most executed methods stats
of your application. We have observed that less than 5% of methods in your
overall application accounts for more than 90% of code execution. Thus, if you
can optimize this 5% of methods, you can improve entire application’s
performance significantly. It gives you the best ROI.
3.
Accurate Smoke Test Suite
When you
write smoke tests, you need to make sure to exercise most critical methods of
the application. Call Stack tree shows you most executed methods of your
application. Thus, Call Stack Tree facilitates you to write highly targeted
unit tests to exercise the critical methods and making your application robust
for production deployment. This sort of accurate test suite reduces over-all
test execution time. It can also reduce the test data setup time in the backend
systems. You can also integrate these tests into your CI/CD pipeline as well.
Author bio:
Every single day,
millions & millions of people in North America—bank, travel, and
commerce—use the applications that Ram Lakshmanan has architected.
Ram is an acclaimed speaker in major conferences on scalability, availability,
and performance topics. Recently, he has founded a startup, which specializes
in troubleshooting performanceproblems.