From dbb67b55871a27a1b368a0c69a0259f93108b152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E5=90=89?= <983433479@qq.com> Date: Wed, 14 Jun 2023 18:45:43 +0800 Subject: [PATCH] update profile include/exclude doc (#2560) --- .../arthas/core/command/monitor200/ProfilerCommand.java | 2 +- site/docs/doc/profiler.md | 6 +++--- site/docs/en/doc/profiler.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java b/core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java index f86b1879b..8c1fb6e16 100644 --- a/core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java +++ b/core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java @@ -54,7 +54,7 @@ import one.profiler.Counter; + " profiler stop --format html # output file format, support html,jfr\n" + " profiler stop --file /tmp/result.html\n" + " profiler stop --threads \n" - + " profiler start --include 'java/*' --include 'demo/*' --exclude '*Unsafe.park*'\n" + + " profiler start --include 'java/*' --include 'com/demo/*' --exclude '*Unsafe.park*'\n" + " profiler status\n" + " profiler resume # Start or resume profiling without resetting collected data.\n" + " profiler getSamples # Get the number of samples collected during the profiling session\n" diff --git a/site/docs/doc/profiler.md b/site/docs/doc/profiler.md index 9af3f839f..ee817cf0d 100644 --- a/site/docs/doc/profiler.md +++ b/site/docs/doc/profiler.md @@ -177,13 +177,13 @@ profiler start --framebuf 5000000 ## 配置 include/exclude 来过滤数据 -如果应用比较复杂,生成的内容很多,想只关注部分数据,可以通过 include/exclude 来过滤。比如 +如果应用比较复杂,生成的内容很多,想只关注部分 stack traces,可以通过 `--include/--exclude` 过滤 stack traces,`--include` 表示定义的匹配表达式必须出现在 stack traces,相反 `--exclude` 表示定义的匹配表达式一定不会出现在 stack traces。 匹配表达式可以以`*`开始或者结束,`*` 表示任何(可能为空)字符序列。 比如 ```bash -profiler start --include 'java/*' --include 'demo/*' --exclude '*Unsafe.park*' +profiler start --include 'java/*' --include 'com/demo/*' --exclude '*Unsafe.park*' ``` -> include/exclude 都支持设置多个值 ,但是需要配置在命令行的最后。 +> `--include/--exclude` 都支持设置多个值 ,但是需要配置在命令行的最后。 ## 指定执行时间 diff --git a/site/docs/en/doc/profiler.md b/site/docs/en/doc/profiler.md index 031aed182..ed7b25abf 100644 --- a/site/docs/en/doc/profiler.md +++ b/site/docs/en/doc/profiler.md @@ -179,13 +179,13 @@ profiler start --framebuf 5000000 ## Configure include/exclude to filter data -If the application is complex and generates a lot of content, and you want to focus on only part of the data, you can filter by include/exclude. such as +If the application is complex and generates a lot of content, and you want to focus on only part of stack traces, you can filter stack traces by `--include/--exclude`. `--include` defines the name pattern that must be present in the stack traces, while `--exclude` is the pattern that must not occur in any of stack traces in the output.A pattern may begin or end with a star `*` that denotes any (possibly empty) sequence of characters. such as ```bash -profiler start --include'java/*' --include'demo/*' --exclude'*Unsafe.park*' +profiler start --include'java/*' --include 'com/demo/*' --exclude'*Unsafe.park*' ``` -> Both include/exclude support setting multiple values, but need to be configured at the end of the command line. +> Both `--include/--exclude` support setting multiple values, but need to be configured at the end of the command line. ## Specify execution time