Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

How to get specific build step time(not whole steps) #3884

fcb_0817 ·

Hi Support,

I'm trying to collect build step time(duraion) for further compiling performance investigation automatically.

I don't want to do it manually via 'step status' to see from GUI.

Here is a cconfiguration:
Step1 - generate A solution
Step2 - compile A solution
Step3 - copy B jobs

Is it possible to get only Step2's duration by script or API? If yes, how to use it?

I tried 2 ways to do according:

Misc->Execute Script

Post-Execute Action->Execute a script

But 'step_time' in Variables was always NULL(not defined).



  • solved #2
  • replies 2
  • views 1055
  • stars 0
robinshen ADMIN ·

Step duration is populated when build is finished. You may use below in post-build script of your configuration (can be defined in advanced setting of the configuration):

for (step in build.getSteps()) { 
  logger.warn(step.path.toString() + ": " + step.duration); 
fcb_0817 ·

Hi Robinshen,

It works for me. Thank you!

I added this script in 'post execution action' of the master step.
10:01:42,214 WARN - master: null
10:01:42,222 WARN - master>sync_code: 2140
10:01:42,222 WARN - master>Generate_Project: 7354
10:01:42,228 WARN - master>Compile_Editor_Win32_Debug: 3929
10:01:42,228 WARN - master>Compile_Editor_Win32_Release: 4033