Merge pull request #10126 from atom/as-ci-times

Print steps time during Grunt tasks and script/bootstrap
This commit is contained in:
Antonio Scandurra 2016-01-05 11:27:38 +01:00
commit 018b12973c
3 changed files with 16 additions and 1 deletions

View File

@ -14,6 +14,8 @@ _ = require 'underscore-plus'
packageJson = require '../package.json'
module.exports = (grunt) ->
require('time-grunt')(grunt)
grunt.loadNpmTasks('grunt-babel')
grunt.loadNpmTasks('grunt-coffeelint')
grunt.loadNpmTasks('grunt-lesslint')

View File

@ -37,6 +37,7 @@
"runas": "^3.1",
"tello": "1.0.5",
"temp": "~0.8.1",
"time-grunt": "1.2.2",
"underscore-plus": "1.x",
"unzip": "~0.1.9",
"vm-compatibility-layer": "~0.1.0",

View File

@ -5,8 +5,16 @@ var verifyRequirements = require('./utils/verify-requirements');
var safeExec = require('./utils/child-process-wrapper.js').safeExec;
var path = require('path');
var t0, t1
// Executes an array of commands one by one.
function executeCommands(commands, done, index) {
if (index != undefined) {
t1 = Date.now()
console.log("=> Took " + (t1 - t0) + "ms.");
console.log();
}
index = (index == undefined ? 0 : index);
if (index < commands.length) {
var command = commands[index];
@ -17,6 +25,7 @@ function executeCommands(commands, done, index) {
options = command.options;
command = command.command;
}
t0 = Date.now()
safeExec(command, options, executeCommands.bind(this, commands, done, index + 1));
}
else
@ -96,7 +105,10 @@ function bootstrap() {
message: 'Installing apm...',
options: apmInstallOptions
},
apmPath + ' clean' + apmFlags,
{
command: apmPath + ' clean' + apmFlags,
message: 'Deleting old packages...'
},
moduleInstallCommand,
dedupeApmCommand + ' ' + packagesToDedupe.join(' '),
];