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

feat: support dynamic retransform #160

Merged
merged 1 commit into from
Jun 9, 2023
Merged

feat: support dynamic retransform #160

merged 1 commit into from
Jun 9, 2023

Conversation

YongwuHe
Copy link
Collaborator

@YongwuHe YongwuHe commented May 10, 2023

resTransform(Set<?> resetClasses, List<?> reTransformClasses)
resetClasses means that the classes in it no longer need to be modified in the new configuration, directly reset this class.
reTransformClasses represents that the modification methods of the classes in it have changed, and these classes need to be re-transform.

1.addNewClass
old dynamic config : classA methodA
new dynamic config : classA methodA, classB methodB
resetClasses = empty, reTransformClasses = [classB]

2.deleteClass
old dynamic config : classA methodA, classB methodB
new dynamic config : classA methodA
resetClasses = [classB], reTransformClasses = empty

3.existing class add method
old dynamic config : classA methodA
new dynamic config : classA methodA, classA methodB
resetClasses = empty, reTransformClasses = [classA methodA, classA methodB]

4.existing class delete method
old dynamic config : classA methodA, classA methodA2
new dynamic config : classA methodA,
resetClasses = empty, reTransformClasses = [classA methodA]

5.existing class add method and delete class
old dynamic config : classA methodA, classB methodB
new dynamic config : classA methodA, classA methodA2
resetClasses = [classB ], reTransformClasses = [classA methodA, classA methodA2]

@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Merging #160 (4d2e544) into main (4f54665) will increase coverage by 0.62%.
The diff coverage is 83.47%.

@@             Coverage Diff              @@
##               main     #160      +/-   ##
============================================
+ Coverage     52.42%   53.04%   +0.62%     
- Complexity     1416     1479      +63     
============================================
  Files           222      224       +2     
  Lines          8450     8547      +97     
  Branches        999     1018      +19     
============================================
+ Hits           4430     4534     +104     
+ Misses         3599     3589      -10     
- Partials        421      424       +3     
Impacted Files Coverage Δ
...rex/inst/runtime/model/DynamicClassStatusEnum.java 0.00% <0.00%> (ø)
...ava/io/arex/foundation/config/ConfigConstants.java 0.00% <ø> (ø)
...rex/inst/dynamic/common/DynamicClassExtractor.java 90.84% <33.33%> (+1.88%) ⬆️
...arex/agent/instrumentation/BaseAgentInstaller.java 87.75% <50.00%> (+1.21%) ⬆️
...ime/config/listener/SerializeSkipInfoListener.java 88.88% <50.00%> (-11.12%) ⬇️
...io/arex/inst/runtime/model/DynamicClassEntity.java 51.78% <58.33%> (+13.14%) ⬆️
...ava/io/arex/foundation/services/ConfigService.java 80.00% <60.00%> (+1.17%) ⬆️
...gent/instrumentation/InstrumentationInstaller.java 83.49% <77.08%> (-4.18%) ⬇️
...nst/dynamic/DynamicClassModuleInstrumentation.java 92.30% <80.00%> (-7.70%) ⬇️
.../arex/agent/instrumentation/TransformListener.java 90.90% <90.90%> (ø)
... and 5 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@YongwuHe YongwuHe force-pushed the feature/restransform branch 10 times, most recently from f96a59d to a923794 Compare May 15, 2023 11:24
@mr3 mr3 added the enhancement ⭐ New feature or request label May 17, 2023
@mr3 mr3 marked this pull request as draft June 2, 2023 12:10
@mr3 mr3 force-pushed the feature/restransform branch 7 times, most recently from 4fc29bf to b9909ae Compare June 5, 2023 08:32
@mr3 mr3 marked this pull request as ready for review June 5, 2023 08:33
@mr3 mr3 force-pushed the feature/restransform branch 3 times, most recently from 844884f to 0bceb08 Compare June 5, 2023 13:41
@mr3 mr3 force-pushed the feature/restransform branch 5 times, most recently from 874ddc1 to 89c53de Compare June 6, 2023 12:29
lucas-myx
lucas-myx previously approved these changes Jun 7, 2023
@mr3 mr3 requested a review from lucas-myx June 9, 2023 03:10
@sonarcloud
Copy link

sonarcloud bot commented Jun 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

91.9% 91.9% Coverage
0.0% 0.0% Duplication

@mr3 mr3 merged commit fc09f15 into main Jun 9, 2023
10 checks passed
@mr3 mr3 deleted the feature/restransform branch June 9, 2023 03:34
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.

None yet

3 participants