Skip to content

Commit 506fd41

Browse files
committed
🎨 added instrumentation for prebuild postbuild steps
1 parent b569c9d commit 506fd41

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/commands/runs.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const { getStackTraceUrl } = require('../helpers/sync/syncSpecsLogs');
2424

2525
module.exports = function run(args, rawArgs) {
2626

27+
markBlockStart('preBuild');
2728
// set debug mode (--cli-debug)
2829
utils.setDebugMode(args);
2930

@@ -185,6 +186,8 @@ module.exports = function run(args, rawArgs) {
185186
logger.debug("Started build creation");
186187
markBlockStart('createBuild');
187188
return build.createBuild(bsConfig, zip).then(function (data) {
189+
markBlockEnd('preBuild');
190+
markBlockStart('buildProcessing');
188191
logger.debug("Completed build creation");
189192
markBlockEnd('createBuild');
190193
markBlockEnd('total');
@@ -216,6 +219,8 @@ module.exports = function run(args, rawArgs) {
216219
if (args.sync) {
217220
logger.debug("Started polling build status from BrowserStack");
218221
syncRunner.pollBuildStatus(bsConfig, data, rawArgs, buildReportData).then(async (exitCode) => {
222+
markBlockEnd('buildProcessing');
223+
markBlockStart('postBuild');
219224
logger.debug("Completed polling of build status");
220225

221226
// stop the Local instance
@@ -234,6 +239,7 @@ module.exports = function run(args, rawArgs) {
234239
// Generate custom report!
235240
reportGenerator(bsConfig, data.build_id, args, rawArgs, buildReportData, function(){
236241
utils.sendUsageReport(bsConfig, args, `${message}\n${dashboardLink}`, Constants.messageTypes.SUCCESS, null, buildReportData, rawArgs);
242+
markBlockEnd('postBuild');
237243
utils.handleSyncExit(exitCode, data.dashboard_url);
238244
});
239245
} else {

0 commit comments

Comments
 (0)