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

chore: Add javaspy coloring for flamegraphs #1148

Merged
merged 6 commits into from
Jun 10, 2022
Merged

Conversation

Rperry2174
Copy link
Contributor

@Rperry2174 Rperry2174 commented Jun 9, 2022

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2022

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
webapp/public/assets/app.js 464.42 KB (0%) 9.3 s (0%) 2.5 s (+1.32% 🔺) 11.8 s

@eh-am
Copy link
Collaborator

eh-am commented Jun 9, 2022

Hmm can you add the test cases you used here?
https://github.com/pyroscope-io/pyroscope/blob/main/packages/pyroscope-flamegraph/src/FlameGraph/FlameGraphComponent/color.spec.ts

@codecov
Copy link

codecov bot commented Jun 9, 2022

Codecov Report

Merging #1148 (1f91b3e) into main (efcb0bb) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1148      +/-   ##
==========================================
+ Coverage   70.58%   70.60%   +0.02%     
==========================================
  Files          98       98              
  Lines        3144     3146       +2     
  Branches      801      802       +1     
==========================================
+ Hits         2219     2221       +2     
  Misses        921      921              
  Partials        4        4              
Impacted Files Coverage Δ
...egraph/src/FlameGraph/FlameGraphComponent/color.ts 80.90% <ø> (+0.44%) ⬆️

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 efcb0bb...1f91b3e. Read the comment docs.

@korniltsev
Copy link
Collaborator

For org/apache/catalina/core/ApplicationFilterChain.doFilter package is org/apache/catalina/core/, class/file name is ApplicationFilterChain and method name is doFilter

Packages usually start with reversed domain name (org/apache) but technically it can be 1 depth package like
foo/Bar.baz or even 0 - no package Bar.baz

Maybe something like this ^(?<packageName>.+\/)?(?<filneame>.+\.)(?<functionName>.+)$ ?

@@ -93,6 +93,8 @@ function spyToRegex(spyName: string) {
return /^(?<packageName>(.*\/)*)(?<filename>.*\.rb+)(?<line_info>.*)$/;
case 'nodespy':
return /^(\.\/node_modules\/)?(?<packageName>[^/]*)(?<filename>.*\.?(jsx?|tsx?)?):(?<functionName>.*):(?<line_info>.*)$/;
case 'javaspy':
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@petethepig is this correct (and does the client send this already or do we need to make a change somewhere)

@Rperry2174 Rperry2174 merged commit 2b9a4d9 into main Jun 10, 2022
@Rperry2174 Rperry2174 deleted the add-javaspy-coloring branch June 10, 2022 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants