Skip to content

(GH258) Change duration to be per task instead of cumulative#260

Merged
devblackops merged 1 commit intopsake:masterfrom
sideproject:timing
Aug 28, 2018
Merged

(GH258) Change duration to be per task instead of cumulative#260
devblackops merged 1 commit intopsake:masterfrom
sideproject:timing

Conversation

@sideproject
Copy link
Copy Markdown

This is the pull request to go along with #258

Description

The task durations in the Build Time Report are cumulative instead of specific to each task.

For the following psake script:

properties {  
}

task default -depends Three

task Three -depends One, Two {
  write-host "Sleeping 1"
  Sleep 1
}

task Two -depends One {
  write-host "Sleeping 2"
  Sleep 2
}

task One {
  write-host "Sleeping 1"
  Sleep 1
}

I would expect the output to be:

----------------------------------------------------------------------
Build Time Report
----------------------------------------------------------------------
Name   Duration
----   --------
One    00:00:01.003
Two    00:00:02.003
Three  00:00:01.003
Total: 00:00:04.020

But the output is:

----------------------------------------------------------------------
Build Time Report
----------------------------------------------------------------------
Name   Duration
----   --------
One    00:00:01.003
Two    00:00:02.002
Three  00:00:04.009
Total: 00:00:04.017

Related Issue

#258

How Has This Been Tested?

I tested this locally and all current pester tests still pass

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@devblackops
Copy link
Copy Markdown
Member

LGTM @sideproject. Thanks!

@devblackops devblackops self-assigned this Aug 28, 2018
@devblackops devblackops removed their request for review August 28, 2018 04:08
@devblackops devblackops merged commit 6ccbc3d into psake:master Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants