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

Fix performance drop drastically while profiling a Ballerina program #41538

Merged

Conversation

warunalakshitha
Copy link
Contributor

@warunalakshitha warunalakshitha commented Oct 18, 2023

Purpose

Fixes #41300
Fixes #41547

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@gabilang gabilang added the Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime label Oct 18, 2023
@HindujaB
Copy link
Contributor

The approach for the fix #41547 :
Earlier the instrumented temp.jar was executed at the target/bin directory, so it didn't read the Config.toml file in the package directory (which is the default directory for configuration files).
In the fix, I passed the current directory to Profiler.jar through an env variable, and used it to run the executable. And changed the cpu_pre.json path accordingly.

@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (2b9e233) 76.71% compared to head (7fd2579) 76.73%.
Report is 144 commits behind head on master.

Files Patch % Lines
...in/java/io/ballerina/cli/task/RunProfilerTask.java 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #41538      +/-   ##
============================================
+ Coverage     76.71%   76.73%   +0.02%     
- Complexity    52671    52717      +46     
============================================
  Files          2880     2878       -2     
  Lines        198584   198709     +125     
  Branches      25802    25825      +23     
============================================
+ Hits         152341   152480     +139     
+ Misses        37810    37803       -7     
+ Partials       8433     8426       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

gabilang
gabilang previously approved these changes Oct 24, 2023
Copy link
Contributor

@gabilang gabilang left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Nadeeshan96 Nadeeshan96 left a comment

Choose a reason for hiding this comment

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

Are we resolving #41554 (comment) with this PR or another PR?

Copy link
Contributor

@HindujaB HindujaB left a comment

Choose a reason for hiding this comment

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

LGTM

@warunalakshitha
Copy link
Contributor Author

Are we resolving #41554 (comment) with this PR or another PR?

Added a test

@warunalakshitha warunalakshitha merged commit 20de357 into ballerina-platform:master Dec 5, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/jBallerina All the issues related to BIR, JVM backend code generation and runtime
Projects
None yet
4 participants