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

[2201.8.x] Fix performance drop drastically while profiling a Ballerina program #41554

Conversation

warunalakshitha
Copy link
Contributor

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

@warunalakshitha warunalakshitha changed the base branch from master to 2201.8.x October 20, 2023 10:50
@codecov
Copy link

codecov bot commented Oct 21, 2023

Codecov Report

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

Comparison is base (c8d0409) 76.34% compared to head (9e94460) 76.36%.
Report is 56 commits behind head on 2201.8.x.

Additional details and impacted files
@@              Coverage Diff               @@
##             2201.8.x   #41554      +/-   ##
==============================================
+ Coverage       76.34%   76.36%   +0.01%     
- Complexity      52521    52541      +20     
==============================================
  Files            2881     2880       -1     
  Lines          198605   198680      +75     
  Branches        25805    25812       +7     
==============================================
+ Hits           151629   151714      +85     
+ Misses          38620    38615       -5     
+ Partials         8356     8351       -5     
Files Coverage Δ
...erina/runtime/internal/BallerinaXmlSerializer.java 79.24% <100.00%> (ø)
.../io/ballerina/runtime/internal/XmlTreeBuilder.java 72.89% <100.00%> (+1.05%) ⬆️
.../ballerina/runtime/internal/scheduling/Strand.java 65.60% <ø> (ø)
.../ballerina/runtime/internal/values/ErrorValue.java 84.09% <100.00%> (ø)
...lerina/runtime/internal/values/TableValueImpl.java 82.51% <100.00%> (ø)
.../io/ballerina/runtime/internal/values/XmlItem.java 59.60% <100.00%> (ø)
...rc/main/java/io/ballerina/cli/cmd/CommandUtil.java 81.21% <100.00%> (ø)
.../java/io/ballerina/projects/JBallerinaBackend.java 77.56% <100.00%> (ø)
...io/ballerina/projects/internal/ModuleResolver.java 89.39% <100.00%> (ø)
...o/ballerina/projects/internal/SettingsBuilder.java 67.70% <100.00%> (ø)
... and 44 more

... and 1 file with indirect coverage changes

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

@github-actions github-actions bot added the Stale label Nov 5, 2023
@warunalakshitha warunalakshitha changed the title Fix performance drop drastically while profiling a Ballerina program [8.x] Fix performance drop drastically while profiling a Ballerina program Nov 6, 2023
@ballerina-platform ballerina-platform deleted a comment from github-actions bot Nov 6, 2023
@warunalakshitha warunalakshitha added this to the 2201.8.3 milestone Nov 6, 2023
@warunalakshitha warunalakshitha changed the title [8.x] Fix performance drop drastically while profiling a Ballerina program [2201.8.x] Fix performance drop drastically while profiling a Ballerina program Nov 6, 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.

If possible shall we also add a test to check the performance of bal profile (maybe in another PR). We can use this same snippet #41300 (comment) (1st snippet here) and profile it and check whether it runs under 3 seconds or something like that. We can examine the output and check whether it contains all the user defined functions and reasonable times in the output.

When I tested the output I saw it does not contain isSortedArray function in the flame graph. How did that get omitted?
image

@warunalakshitha
Copy link
Contributor Author

If possible shall we also add a test to check the performance of bal profile (maybe in another PR). We can use this same snippet #41300 (comment) (1st snippet here) and profile it and check whether it runs under 3 seconds or something like that. We can examine the output and check whether it contains all the user defined functions and reasonable times in the output.

When I tested the output I saw it does not contain isSortedArray function in the flame graph. How did that get omitted? image

Will add a test in master PR.

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.

LGTM

@warunalakshitha warunalakshitha merged commit cd86be5 into ballerina-platform:2201.8.x Nov 12, 2023
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants