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

refactor startup endpoint #795

Merged
merged 6 commits into from
Jan 7, 2021
Merged

refactor startup endpoint #795

merged 6 commits into from
Jan 7, 2021

Conversation

HzjNeverStop
Copy link
Contributor

No description provided.

@HzjNeverStop HzjNeverStop linked an issue Jan 5, 2021 that may be closed by this pull request
@codecov-io
Copy link

codecov-io commented Jan 5, 2021

Codecov Report

Merging #795 (65dce78) into master (04aa3e8) will increase coverage by 0.58%.
The diff coverage is 87.53%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #795      +/-   ##
============================================
+ Coverage     70.69%   71.28%   +0.58%     
  Complexity       32       32              
============================================
  Files           294      297       +3     
  Lines          8254     8374     +120     
  Branches       1149     1160      +11     
============================================
+ Hits           5835     5969     +134     
+ Misses         1748     1735      -13     
+ Partials        671      670       -1     
Impacted Files Coverage Δ Complexity Δ
...e/health/SofaBootHealthCheckAutoConfiguration.java 95.45% <ø> (ø) 0.00 <0.00> (ø)
...gure/startup/StartupEndPointAutoConfiguration.java 100.00% <ø> (ø) 0.00 <0.00> (ø)
...boot/actuator/startup/SofaBootStartupEndPoint.java 50.00% <0.00%> (ø) 1.00 <0.00> (ø)
...lipay/sofa/healthcheck/ReadinessCheckListener.java 87.06% <ø> (ø) 0.00 <0.00> (ø)
...pay/sofa/isle/stage/SpringContextInstallStage.java 80.00% <ø> (ø) 0.00 <0.00> (ø)
...m/alipay/sofa/boot/startup/BootStageConstants.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...a/isle/spring/factory/BeanLoadCostBeanFactory.java 65.06% <61.40%> (-12.22%) 0.00 <0.00> (ø)
...in/java/com/alipay/sofa/boot/startup/BeanStat.java 75.43% <75.43%> (ø) 0.00 <0.00> (?)
.../java/com/alipay/sofa/startup/StartupReporter.java 93.33% <93.33%> (ø) 0.00 <0.00> (?)
.../java/com/alipay/sofa/boot/startup/ModuleStat.java 94.73% <94.73%> (ø) 0.00 <0.00> (?)
... and 35 more

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 04aa3e8...65dce78. Read the comment docs.

CommonStartupCost commonStartupCost = new CommonStartupCost();
commonStartupCost.setName(name.getRawName());
commonStartupCost.setBeginTime(System.currentTimeMillis());
StageStat stageStat = new StageStat();
Copy link
Contributor

Choose a reason for hiding this comment

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

这是给每个 sofa 组件都算一下时间?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这是给每个 sofa 组件都算一下时间?

这里是之前的逻辑,应该删掉的

Copy link
Contributor

Choose a reason for hiding this comment

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

所以现在是还留着对吗

Copy link
Contributor Author

Choose a reason for hiding this comment

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

所以现在是还留着对吗

删掉了

*/
public interface BeanStatExtension {
void customBeanStat(String beanName, RootBeanDefinition mbd, Object[] args, BeanStat bs);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

no new line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no new line

done


if (beanStatExtension != null) {
beanStatExtension.customBeanStat(beanName, mbd, args, bs);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

扩展点的展示结果是什么样的?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

扩展点的展示结果是什么样的?

扩展点用于定制bs

Copy link
Contributor

@alaneuler alaneuler left a comment

Choose a reason for hiding this comment

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

LGTM

@HzjNeverStop HzjNeverStop merged commit 3595844 into sofastack:master Jan 7, 2021
@HzjNeverStop HzjNeverStop deleted the startup branch January 7, 2021 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance the startup endpoint
3 participants