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

Gather @Condition performance metrics #7939

Open
philwebb opened this issue Jan 10, 2017 · 3 comments
Open

Gather @Condition performance metrics #7939

philwebb opened this issue Jan 10, 2017 · 3 comments
Labels
type: task A general task

Comments

@philwebb
Copy link
Member

We could do with knowing which conditions are slow/fast so we can optimize.

@wilkinsona
Copy link
Member

Some preliminary timings:

1.5 Actuator sample jar:

Condition Time (ms)
CacheCondition 0.842495
DefaultDispatcherServletCondition 0.522723
DispatcherServletRegistrationCondition 3.09485
EmbeddedDatabaseCondition 1.769343
ErrorTemplateMissingCondition 9.902529
GitResourceAvailableCondition 0.291634
JmxEnabledCondition 2.346582
LogFileCondition 0.286643
MailSenderCondition 1.339892
OnBeanCondition 164.222704
OnClassCondition 35.069383
OnCloudPlatformCondition 0.09293
OnEnabledEndpointCondition 1.43508
OnEnabledHealthIndicatorCondition 3.402162
OnEnabledInfoContributorCondition 0.677727
OnEnabledResourceChainCondition 1.701722
OnJavaCondition 0.857914
OnManagementMvcCondition 1.461866
OnPropertyCondition 9.097541
OnResourceCondition 0.814681
OnValidatorAvailableCondition 72.347993
OnWebApplicationCondition 1.02135
PooledDataSourceCondition 10.150408
ResourceBundleCondition 0.847989
WebSecurityEnablerCondition 0.0882

1.5 Freemarker sample jar

Condition Time (ms)
CacheCondition 1.083238
DefaultDispatcherServletCondition 0.836775
DispatcherServletRegistrationCondition 2.849338
ErrorTemplateMissingCondition 6.467199
GitResourceAvailableCondition 0.282914
OnBeanCondition 91.857201
OnClassCondition 18.029774
OnEnabledResourceChainCondition 2.744087
OnJavaCondition 0.712423
OnPropertyCondition 5.957752
OnResourceCondition 0.728593
OnValidatorAvailableCondition 133.835755
OnWebApplicationCondition 0.886211
ResourceBundleCondition 0.805604

@philwebb
Copy link
Member Author

I knew about OnBeanCondition and I think we'll need some framework changes and help from @jhoeller to fix that one. The OnValidatorAvailableCondition is pretty amazing, especially as it's used just once!

@philwebb
Copy link
Member Author

I've raised #8110 to look at the validator one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants