Before looking at the user guide, install the Collector, API.
This guide assumes that Collector uses port 8080 and the API uses port 8081.
Connect to http://{API host}:8081/scavenger
.
- Click the
Create workspace
button in the bottom left corner. - When the
Create workspace
modal appears, fill in the workspace name. - Click the
Create
button to create the workspace.
- When using the Scavenger Agent, you need a configuration file for what settings you want the agent to run with.
- Scavenger provides a feature to create a configuration file to make it easier to set up the agent.
- Click the
Show Scavenger configuration file generator
button.
- When the
Create scavenger configuration file
modal appears- Set the configuration.
- Click the
Download
button to download the configuration.
- For a detailed overview of the configuration, please refer to the Configuration guide.
Based on the information gathered by the scavenger collector, you can take a snapshot to see the invocation history of a method after a specific moment in time like heap dump.
- Click
Snapshots
in the LNB menu. - Click the
Create
button. - When the
Create Snapshot
modal appears, Enter the configurations to create the snapshot. - Click the
Create
button to create the snapshot.
The snapshot configuration is as follows
configuration | Description |
---|---|
Name | |
Application | |
Environment | |
Packages | , and supports ant matches such as * , ** . If not given, includes all packages. |
Filter invoked at | 2022.10.23 10:00 , methods that were invoked only before 2022.10.23 10:00 will be evaluated as dead code, that is, methods that are no longer invoked. |
Let's assume you have a project consisting of api, batch, and admin applications, with api and batch using the core module and admin not using core.
If you want to see the dead code for core and service layer after 2022.10.23 15:00, you can create a snapshot like below.
- a) Recreate a snapshot based on the most recent invocation state currently collected.
- b) A graph of the call treemap within the selected package.
- The larger the area, the higher the number of methods.
- The lower the percentage of calls, the black color.
- c) Package-level invocation status (number of methods / invocation rate).
- d) Open the class in IntelliJ / Github.