Skip to content

Add duration of a task #2746

@GeertvanHorrik

Description

@GeertvanHorrik

What You Are Seeing?

Whenever there is a task, we have no idea how long it took, unless the script fully succeeds. A good example is this build output:

image

What is Expected?

The timings are only written to the output if a build succeeds. We are currently trying to optimize local builds (making them as fast as possible so devs don't have to wait too long). Therefore, it would be really nice if every task would have a duration at the end:

========================================
UpdateNuGet
========================================
Making sure NuGet is using the latest version
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 5.4.0.
NuGet.exe is up to date.
Updating NuGet.exe exited with '0', version is '5.4.0.6315'

========================================
RestorePackages
========================================

I would like to have a timer that writes at the end of each task:

UpdateNuGet took 5 seconds and 300 ms

What version of Cake are you using?

0.35.0

Are you running on a 32 or 64 bit system?

Irrelevant

What environment are you running on? Windows? Linux? Mac?

Irrelevant

Are you running on a CI Server? If so, which one?

Irrelevant

How Did You Get This To Happen? (Steps to Reproduce)

Irrelevant

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions