-
Notifications
You must be signed in to change notification settings - Fork 153
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
profile_tasks miscalculates task run time with serial execution #83
Labels
bug
This issue/PR relates to a bug.
Comments
ansible-zuul bot
added a commit
that referenced
this issue
Sep 21, 2021
profile_tasks - Correctly calculate task execution time with serial execution SUMMARY Correctly calculate task execution time with serial execution Fixes #83 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ansible.posix.profile_tasks ADDITIONAL INFORMATION After applying this PR, I can confirm that the task execution time with serial execution is correct: Test playbook: --- - hosts: issue_83 gather_facts: false connection: local serial: 1 tasks: - name: TASK_A shell: sleep 3 - name: TASK_B shell: sleep 5 - name: TASK_C shell: sleep 1 Results: $ ansible-playbook -i inventory playbook/profile_tasks/issue_83.yml [DEPRECATION WARNING]: [defaults]callback_whitelist option, normalizing names to new standard, use callback_enabled instead. This feature will be removed from ansible-core in version 2.15. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. PLAY [issue_83] **************************************************************** TASK [TASK_A] ****************************************************************** Friday 10 September 2021 12:40:58 +0900 (0:00:00.008) 0:00:00.008 ****** changed: [server100] TASK [TASK_B] ****************************************************************** Friday 10 September 2021 12:41:02 +0900 (0:00:03.210) 0:00:03.219 ****** changed: [server100] TASK [TASK_C] ****************************************************************** Friday 10 September 2021 12:41:07 +0900 (0:00:05.173) 0:00:08.392 ****** changed: [server100] PLAY [issue_83] **************************************************************** TASK [TASK_A] ****************************************************************** Friday 10 September 2021 12:41:08 +0900 (0:00:01.146) 0:00:09.539 ****** changed: [server101] TASK [TASK_B] ****************************************************************** Friday 10 September 2021 12:41:11 +0900 (0:00:03.185) 0:00:12.724 ****** changed: [server101] TASK [TASK_C] ****************************************************************** Friday 10 September 2021 12:41:16 +0900 (0:00:05.148) 0:00:17.873 ****** changed: [server101] PLAY [issue_83] **************************************************************** TASK [TASK_A] ****************************************************************** Friday 10 September 2021 12:41:17 +0900 (0:00:01.176) 0:00:19.050 ****** changed: [server102] TASK [TASK_B] ****************************************************************** Friday 10 September 2021 12:41:21 +0900 (0:00:03.174) 0:00:22.224 ****** changed: [server102] TASK [TASK_C] ****************************************************************** Friday 10 September 2021 12:41:26 +0900 (0:00:05.190) 0:00:27.415 ****** changed: [server102] PLAY RECAP ********************************************************************* server100 : ok=3 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 server101 : ok=3 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 server102 : ok=3 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Friday 10 September 2021 12:41:27 +0900 (0:00:01.173) 0:00:28.588 ****** =============================================================================== TASK_B ----------------------------------------------------------------- 15.51s TASK_A ------------------------------------------------------------------ 9.57s TASK_C ------------------------------------------------------------------ 3.50s Reviewed-by: Andrew Klychkov <[email protected]> Reviewed-by: None <None>
1 task
1 task
1 task
1 task
1 task
1 task
1 task
ghost
mentioned this issue
May 23, 2022
1 task
1 task
1 task
1 task
This was referenced May 23, 2022
Closed
1 task
This was referenced May 28, 2022
Closed
Closed
This was referenced Jun 4, 2022
This was referenced Jun 18, 2022
This was referenced Jul 31, 2022
Closed
This was referenced Sep 14, 2022
1 task
1 task
1 task
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From @timurakhmadeev on Aug 15, 2020 13:07
SUMMARY
The callback plugin shows time of the last task run. When a task is run in bathes via 'serial', it leads to incorrect results.
ISSUE TYPE
COMPONENT NAME
profile_tasks
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 18.04
STEPS TO REPRODUCE
EXPECTED RESULTS
Total time reported by profile_tasks is 6s+
ACTUAL RESULTS
Total time reported by profile_tasks is ~3s
Copied from original issue: ansible/ansible#71293
The text was updated successfully, but these errors were encountered: