~
~
Ognl, Watch, Trace, etc., are really hard to remember away from the document.
IDEA plugin for arthas command, and is open source.
Github.com/WangJi92/ar…
Arthas console is ok.
How to play it?
Let’s use the trace command to specify what this command does:
-
Performance optimization ~
-
This method is called, the specific process is what! You can see this by calling the chain.
-
You can view the stack of exceptions if there are exceptions
1. Select the function that you want to view performance and right click to bring up the arthas command panel, as shown below
2. Click the Trace command to copy the corresponding command to the clipboard
trace cn.javatiku.yp.admin.controller.IndexController getData -v -n 5 --skipJDKMethod false '1==1'
Copy the code
Arthas Server has started Arthas Server, and Telnet the Arthas Server to diagnose the process. For example:
Telnet 127.0.0.1 3658Copy the code
Here I directly use Xshell connection to avoid the problem of garbled characters, as shown in the picture below
In this way, you can see the specific performance analysis. In fact, I personally feel that the plugin is quite useful ~
You won’t be able to master Arthas from this example, but getting started is enough, and hopefully this article will help you get to grips with this debugging tool
](https://juejin.cn/tag/Java)