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

【enhancement】优化输出被增强类字节码文件的开关和路径配置 #1163

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

lilai23
Copy link
Collaborator

@lilai23 lilai23 commented Apr 1, 2023

【修复issue】#1162

【修改内容】
1、在config.properties增加被增强类的字节码文件输出开关agent.config.isOutputEnhancedClasses,默认为false。
2、默认输出路径为sermant-agent/agent/enhancedClasses/20230401160102123, 最后一层文件夹为输出时间
3、自定义输出路径agent.config.enhancedClassesOutputPath默认为空,如果不配置,将使用2中的默认输出路径。

【用例描述】
测试用例1:
步骤:
(1)agent.config.isOutputEnhancedClasses=false,其余配置不修改,挂载sermant启动宿主应用
(2)查看sermant-agent/agent是否有文件输出
结果:
(1)无输出
测试用例2:
(1)agent.config.isOutputEnhancedClasses=true,其余配置不修改,挂载sermant启动宿主应用
(2)查看sermant-agent/agent是否有文件输出
结果:
(1)sermant-agent/agent/enhancedClasses/20230401160102123, 文件夹中输出被增强类的字节码文件
测试用例3:
(1)agent.config.isOutputEnhancedClasses=true,agent.config.enhancedClassesOutputPath=自定义路径,其余配置不修改,挂载sermant启动宿主应用
(2)查看自定义路径是否有文件输出
结果:
(1)自定义路径/enhancedClasses/20230401160102123, 文件夹中输出被增强类的字节码文件

【自测情况】1、本地静态检查通过;2、测试用例通过

【影响范围】用户需输出查看被增强类的字节码文件时可修改上述配置

@lilai23 lilai23 changed the title 【enhancement】优化增强后输出字节码文件的开关和路径配置 【enhancement】优化输出被增强类字节码文件的开关和路径配置 Apr 1, 2023
@codecov
Copy link

codecov bot commented Apr 1, 2023

Codecov Report

Patch coverage has no change and project coverage change: +41.57 🎉

Comparison is base (2675bdd) 0.00% compared to head (dbf8efc) 41.57%.

Additional details and impacted files
@@              Coverage Diff               @@
##             develop    #1163       +/-   ##
==============================================
+ Coverage           0   41.57%   +41.57%     
- Complexity         0     3184     +3184     
==============================================
  Files              0      810      +810     
  Lines              0    17826    +17826     
  Branches           0     1938     +1938     
==============================================
+ Hits               0     7411     +7411     
- Misses             0     9475     +9475     
- Partials           0      940      +940     
Flag Coverage Δ
unittests 41.57% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...uaweicloud/sermant/core/common/CommonConstant.java 100.00% <ø> (ø)
...ermant/core/plugin/agent/BufferedAgentBuilder.java 0.00% <0.00%> (ø)
.../sermant/core/plugin/agent/config/AgentConfig.java 0.00% <0.00%> (ø)
.../com/huaweicloud/sermant/core/utils/FileUtils.java 16.94% <0.00%> (ø)

... and 806 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lilai23 lilai23 force-pushed the develop branch 2 times, most recently from a73e6b6 to 993b6e5 Compare April 1, 2023 08:29
@lilai23 lilai23 force-pushed the develop branch 3 times, most recently from efeead7 to 78f86f6 Compare April 1, 2023 10:26
Copy link
Collaborator

@robotLJW robotLJW left a comment

Choose a reason for hiding this comment

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

/lgtm

@robotLJW robotLJW added kind/enhancement Issues or PRs releated to sermant enhancement status/lgtm Indicates that a PR is ready to be merged. labels Apr 3, 2023
@robotLJW robotLJW added this to the v1.1.0 milestone Apr 3, 2023
@robotLJW robotLJW merged commit e6167c0 into sermant-io:develop Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Issues or PRs releated to sermant enhancement status/lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants