Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add heap command filter #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

lazertester
Copy link

I found it useful to filter the heap when troubleshooting memory issues. For instance /heap net.minecraft or /heap org.bukkit.

I found it useful to filter the heap when troubleshooting memory issues. For instance `/heap net.minecraft` or `/heap org.bukkit`.
@games647
Copy link
Owner

Great idea. Could you document the filter in the readme. Then it's ready to be merged.

}

List<BaseComponent[]> paginatedLines = new ArrayList<>();
try {
String reply = invokeDiagnosticCommand(HEAP_COMMAND, EMPTY_STRING);
for (String line : reply.split("\n")) {
paginatedLines.add(new ComponentBuilder(line).create());
if(filter == null || line.contains(filter)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(filter == null || line.contains(filter)) {
if (filter == null || line.contains(filter)) {

Missing space

@games647 games647 added the enhancement New feature or request label Jun 11, 2020
Base automatically changed from master to main January 20, 2021 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants