Skip to content

Commit

Permalink
Report build statistics in a separate TC block. (brave#24975)
Browse files Browse the repository at this point in the history
  • Loading branch information
goodov authored Aug 5, 2024
1 parent 4b7a08d commit 69e4d1d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions build/commands/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,10 @@ const util = {
// with debugging issues (e.g., slowness or remote-failures).
options.env.AUTONINJA_BUILD_ID = buildId

// Collect build statistics into this variable to display in a separate TC
// block.
let buildStats = ''

if (config.isTeamcity) {
// Parse output to display the build status and exact failure location.
let hasError = false
Expand All @@ -754,6 +758,8 @@ const util = {
}
if (hasError) {
Log.error(line)
} else if (buildStats || /^(RBE Stats:|metric\s+count)\s+/.test(line)) {
buildStats += line + '\n'
} else {
console.log(line)
if (Date.now() - lastStatusTime > 5000) {
Expand All @@ -773,6 +779,12 @@ const util = {
await util.runAsync('autoninja', ninjaOpts, options)

Log.progressFinish(progressMessage)

if (config.isTeamcity && buildStats) {
Log.progressScope('report build stats', () => {
console.log(buildStats)
})
}
},

generateXcodeWorkspace: () => {
Expand Down

0 comments on commit 69e4d1d

Please sign in to comment.