Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature added -t option to measure task excution time (#61) #76

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kkml4220
Copy link

@kkml4220 kkml4220 commented Apr 28, 2024

Summary

I have implemented a solution for issue #61 (ref: #61) which has been inactive for a while and also relevant to my own needs.

Details

To prepare for future options using decorators, I have enhanced the runner by allowing it to receive a list of decorators. This enhancement supports an option to display the task name and measure the execution time with either -t or --time.

Screenshots

image

@kkml4220 kkml4220 changed the title feature added -t option to measure excution time (#61) feature added -t option to measure task excution time (#61) Apr 28, 2024
@eugenetriguba
Copy link
Collaborator

@kkml4220 Hi Takahashi, thank you for taking the time to implement this! The changes make sense to me, but this change will need some tests for it in order for it to be accepted 🙂

@eugenetriguba eugenetriguba self-requested a review May 25, 2024 17:15
@kkml4220
Copy link
Author

kkml4220 commented May 25, 2024

@eugenetriguba Hi! Thank you for your review. I have added tests for the options and modules I implemented.

I also committed some minor fixes like inserting spaces, and it seems that these implementations are working well.

Regarding the test design, I extended the taskipy options to be added as an array, anticipating that additional options might be added in the future. For unittest and E2E testing, I wrote a test to ensure that a task which should take 1 second, actually has a measured execution time of approximately 1.0 to 1.1 seconds.

If these tests are insufficient, I would appreciate it if you could briefly suggest additional test cases or considerations.

I love using taskipy and think it's a fantastic tool. Once again, thank you for your review.

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.

None yet

2 participants