Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mrproliu
Copy link
Contributor

@mrproliu mrproliu commented Mar 23, 2022

Resolve apache/skywalking#8713

Command screenshot:

image

EBPF Profiling Analysis

image

Trace Profiling Analysis

image

@mrproliu mrproliu added the enhancement New feature or request label Mar 23, 2022
@mrproliu mrproliu added this to the 0.10.0 milestone Mar 23, 2022
@mrproliu mrproliu requested review from kezhenxu94 and wu-sheng March 23, 2022 09:04
@codecov-commenter
Copy link

codecov-commenter commented Mar 23, 2022

Codecov Report

Merging #138 (c630217) into master (db980b5) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #138   +/-   ##
=======================================
  Coverage   27.47%   27.47%           
=======================================
  Files          20       20           
  Lines         404      404           
=======================================
  Hits          111      111           
  Misses        286      286           
  Partials        7        7           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db980b5...c630217. Read the comment docs.

@wu-sheng
Copy link
Member

Could you try a CLI flame map visualization? I think it is a better way to verify CLI command and ebpf profiling result. No matter for codes, PR and demonstration in the future.

@mrproliu
Copy link
Contributor Author

mrproliu commented Mar 23, 2022

I could not find a great visualization to show the profiling analysis. But I could save the analysis as an svg file, then user could open this file on the browser and show the performance issue.
Here is a demo file: https://www.brendangregg.com/FlameGraphs/cpu-bash-flamegraph.svg

And If we are using the CLI with E2E, the yaml format is more perfect to use. the graph as a dump file is for the user to use.

@wu-sheng
Copy link
Member

But I could save the analysis as an svg file,

SVG is good enough.

And If we are using the CLI with E2E, the yaml format is more perfect to use. the graph as a dump file is for the user to use.

Agree.

@wu-sheng
Copy link
Member

I think the html should only output when set --dispaly=html/graph?

@mrproliu
Copy link
Contributor Author

I think the html should only output when set --dispaly=html/graph?

Yes, the analysis default is displayed to graph, and it would output a file. Should the user need to force setting it into the command-line?

@wu-sheng
Copy link
Member

Yes, the analysis default is displayed to graph, and it would output a file. Should the user need to force setting it into the command-line?

What was the default output for profiling trace? I think we should keep consistent.

@mrproliu
Copy link
Contributor Author

Yes, the analysis default is displayed to graph, and it would output a file. Should the user need to force setting it into the command-line?

What was the default output for profiling trace? I think we should keep consistent.

In the default, profiling trace analysis and profiling ebpf analysis output is the graph that generates the perf HTML to the current directory, filename format: flame_graph_{current_timestamp}.html.

@wu-sheng
Copy link
Member

How profiling trace analysis gets a graph out? I don't remember we could do that.

@mrproliu
Copy link
Contributor Author

mrproliu commented Mar 24, 2022

How profiling trace analysis gets a graph out? I don't remember we could do that.

trace profiling data have the dumpCount attribute could help on getting the count of per stack. then it is also dependent on the tree mode(id and parentId to build). So we could use them to build a perf HTML that can see which methods need more time to execute.

@wu-sheng
Copy link
Member

Could you share a screenshot here? I think we didn't have this feature before. This is new too. Please mention this, breaking change, ebpf profiling in change logs separatedly.

@mrproliu
Copy link
Contributor Author

Could you share a screenshot here? I think we didn't have this feature before. This is new too. Please mention this, breaking change, ebpf profiling in change logs separatedly.

Updated. Because the demo of trace profiling it's just using Thread#sleep. So it could only get one stack.

@wu-sheng
Copy link
Member

Make sense to me.

Wait for @kezhenxu94 to review.

@kezhenxu94 kezhenxu94 dismissed their stale review March 24, 2022 12:24

Others LGTM

@wu-sheng wu-sheng merged commit 60cee4a into apache:master Mar 24, 2022
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.

[Feature] [CLI] add ebpf-profile relavtive commands

4 participants