Skip to content

Add flag to measure recipe execution time#3099

Open
GeorgeLS wants to merge 2 commits intocasey:masterfrom
GeorgeLS:master
Open

Add flag to measure recipe execution time#3099
GeorgeLS wants to merge 2 commits intocasey:masterfrom
GeorgeLS:master

Conversation

@GeorgeLS
Copy link

As part of this PR, I have added a new simple feature for printing elapsed time of recipes.
The output format is really simple: <materialized_recipe> (<elapsed_time>).

Here's an example of two recipes and the output for those:

Recipe 1:

test:
    ...

Output:

test (Duration: <time>)

Recipe 2:

test arg:
    ...

Invocation:

just test server

Output:

test server (Duration: <time>)

The duration is reported as soon as the recipe finishes.

Please note that if you have recursive recipes where you basically invoke just inside the recipe, the time reporting won't be propagated to the recursive invocation. If you want to measure the inner-invoked recipe, just pass -t/--time to the inner just invocation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant