Skip to content

Commit

Permalink
增加新选项 --classify
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoGuorui666 committed Sep 17, 2024
1 parent ba4e1c7 commit 0c225cb
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ public class ProfilerCommand extends AnnotatedCommand {
*/
private Integer jstackdepth;

/**
* Automatically classify execution samples into categories
*/
private boolean classify;

/**
* profile different threads separately
*/
Expand Down Expand Up @@ -339,6 +344,12 @@ public void setJfrsync(String jfrsync) {
this.jfrsync = jfrsync;
}

@Option(longName = "classify", flag = true)
@Description("Automatically classify execution samples into categories")
public void setClassify(boolean classify) {
this.classify = classify;
}

@Option(shortName = "t", longName = "threads", flag = true)
@Description("profile different threads separately")
public void setThreads(boolean threads) {
Expand Down Expand Up @@ -579,6 +590,9 @@ private String executeArgs(ProfilerAction action) {
if (this.jstackdepth != null) {
sb.append("jstackdepth=").append(this.jstackdepth).append(COMMA);
}
if (this.classify) {
sb.append("classify").append(COMMA);
}
if (this.threads) {
sb.append("threads").append(COMMA);
}
Expand Down

0 comments on commit 0c225cb

Please sign in to comment.