How to enable output of profiling data in Bamboo logs
Several time-consuming operations in Bamboo including
- Background plan deletion
- Indexing
- ...
can be configured to output profiling data to logs. Enabling it on customer instance or during problem reproduction can provide data required to classify the problem correctly.
In order to enable output of profiling data into Bamboo logs one needs to:
- Stop Bamboo
- Add this parameter
-Datlassian.profile.activate=true
in JVM_SUPPORT_RECOMMENDED_ARGS in bin/setenv.sh or as directed in this page based on your operating system. - Start Bamboo service
- Go to Administration -> Log settings and set debug level
ALL
for classcom.atlassian.util.profiling.UtilTimerStack
The sample output in logs might look like this:
2015-10-14 16:49:24,459 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-3-thread-16] [UtilTimerStack] [224489ms] - DeletionServiceImpl.removePlan(STESTS-PRVAL430-SIM)
[224424ms] - Remove result summaries
[13619ms] - Remove test results
[107720ms] - delete from COMMIT_FILES where COMMIT_ID in (select COMMIT_ID from USER_COMMIT where REPOSITORY_CHANGESET_ID in (select REPOSITORY_CHANGESET_ID from REPOSITORY_CHANGESET wher
e BUILDRESULTSUMMARY_ID in (select BUILDRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILD_KEY = ?) ) )
[4662ms] - delete from USER_COMMIT where REPOSITORY_CHANGESET_ID in (select REPOSITORY_CHANGESET_ID from REPOSITORY_CHANGESET where BUILDRESULTSUMMARY_ID in (select BUILDRESULTSUMMARY_ID
from BUILDRESULTSUMMARY where BUILD_KEY = ?) )
[388ms] - delete from BRS_CONSUMED_SUBSCRIPTION where ARTIFACT_LINK_ID in (select ARTIFACT_LINK_ID from BRS_ARTIFACT_LINK where BUILDRESULTSUMMARY_ID in (select BUILDRESULTSUMMARY_
ID from BUILDRESULTSUMMARY where BUILD_KEY = ?) OR PRODUCERJOBRESULT_ID in (select BUILDRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILD_KEY = ?) ) OR CONSUMER_RESULTSUMMARY_ID in
(select BUILDRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILD_KEY = ?)
[206ms] - delete from BRS_ARTIFACT_LINK where BUILDRESULTSUMMARY_ID in (select BUILDRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILD_KEY = ?) or PRODUCERJOBRESULT_ID in (select BUIL
DRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILD_KEY = ?)
[1420ms] - delete from RELEVANT_CHANGESETS where BUILDRESULTSUMMARY_ID in (select BUILDRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILDRESULTSUMMARY.BUILD_KEY = ?)
[1009ms] - delete from REPOSITORY_CHANGESET where BUILDRESULTSUMMARY_ID in (select BUILDRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILDRESULTSUMMARY.BUILD_KEY = ?)
[3ms] - delete from BUILDRESULTSUMMARY_LABEL where BUILDRESULTSUMMARY_ID in (select BUILDRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILDRESULTSUMMARY.BUILD_KEY = ?)
[90248ms] - delete from BUILDRESULTSUMMARY_CUSTOMDATA where BUILDRESULTSUMMARY_ID in (select BUILDRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILDRESULTSUMMARY.BUILD_KEY = ?)
[714ms] - delete from BRS_LINKEDJIRAISSUES where BUILDRESULTSUMMARY_ID in (select BUILDRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILDRESULTSUMMARY.BUILD_KEY = ?)
[754ms] - delete from VARIABLE_CONTEXT where BUILDRESULTSUMMARY_ID in (select BUILDRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILDRESULTSUMMARY.BUILD_KEY = ?)
[2711ms] - delete from VARIABLE_SUBSTITUTION where BUILDRESULTSUMMARY_ID in (select BUILDRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILDRESULTSUMMARY.BUILD_KEY = ?)
[13ms] - delete from BUILDRESULTSUMMARY where BUILDRESULTSUMMARY.BUILD_KEY = ? and BUILD_TYPE <> 'CHAIN'
[3ms] - delete from STAGE_VARIABLE_CONTEXT where STAGERESULT_ID IN (select STAGERESULT_ID from CHAIN_STAGE_RESULT where CHAINRESULT_ID in (select BUILDRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILD_KEY = ?) )
[666ms] - delete from CHAIN_STAGE_RESULT where CHAINRESULT_ID IN (select BUILDRESULTSUMMARY_ID from BUILDRESULTSUMMARY where BUILD_KEY = ?)
[1ms] - delete from BUILDRESULTSUMMARY where BUILDRESULTSUMMARY.BUILD_KEY = ? and BUILD_TYPE = 'CHAIN'
[9ms] - De-indexing build "STESTS-PRVAL430-SIM"
[10ms] - Remove plan particles and dependencies
[2ms] - Remove plan variables
[11ms] - Remove repositories and plan vcs history
[4ms] - Remove Bandana Data
[5ms] - Remove agent assignments
[1ms] - delete Buildable
[1ms] - DeletionServiceImpl.clearBuildDirectories()
Last modified on Nov 2, 2018
Powered by Confluence and Scroll Viewport.