forked from mirrors/gecko-dev
Bug 1892641 - Add profile markers for gradle project evaluations and task executions to capture execution times in the build profiles. r=florian,glandium
Differential Revision: https://phabricator.services.mozilla.com/D208094
This commit is contained in:
parent
96e3e43921
commit
b0f26d11ff
1 changed files with 28 additions and 0 deletions
28
build.gradle
28
build.gradle
|
|
@ -73,6 +73,34 @@ def getRustVersionFor(packageName) {
|
|||
}
|
||||
|
||||
allprojects {
|
||||
def shouldPrintBuildStatus =
|
||||
System.getenv("MACH") && !System.getenv("NO_BUILDSTATUS_MESSAGES")
|
||||
|
||||
if (shouldPrintBuildStatus) {
|
||||
// Adding new line before each line to make sure they're dumped as a separate line.
|
||||
// Add profile marker to the start of the project evaluation
|
||||
project.beforeEvaluate {
|
||||
println "\nBUILDSTATUS START_gradle:evaluate-project ${project.name}"
|
||||
}
|
||||
|
||||
// Add profile marker to the end of the project evaluation
|
||||
project.afterEvaluate {
|
||||
println "\nBUILDSTATUS END_gradle:evaluate-project ${project.name}"
|
||||
}
|
||||
|
||||
tasks.configureEach { task ->
|
||||
// Add profile marker to the start of the gradle task
|
||||
task.doFirst {
|
||||
println "\nBUILDSTATUS START_gradle:${project.name}-tasks ${task.name}"
|
||||
}
|
||||
|
||||
// Add profile marker to the end of the gradle task
|
||||
task.doLast {
|
||||
println "\nBUILDSTATUS END_gradle:${project.name}-tasks ${task.name}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Expose the per-object-directory configuration to all projects.
|
||||
ext {
|
||||
mozconfig = gradle.mozconfig
|
||||
|
|
|
|||
Loading…
Reference in a new issue