-
-
Notifications
You must be signed in to change notification settings - Fork 272
Build Time Report is cumulative #258
Copy link
Copy link
Closed
Labels
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
Possible Solution
I have a pull request ready if this is something you're interested in accepting. The issue appears to be starting the stopwatch before all the dependent tasks are completed instead of after.
Your Environment
Psake version: latest (master)
OS: Windows 10
Name Value
---- -----
PSVersion 5.1.17134.228
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.228
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Reactions are currently unavailable