Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
9d4d7bd7
Commit
9d4d7bd7
authored
Sep 11, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed porting bugs in profile_tasks to v2
parent
ba7734b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
lib/ansible/plugins/callback/profile_tasks.py
+6
-6
No files found.
lib/ansible/plugins/callback/profile_tasks.py
View file @
9d4d7bd7
...
@@ -53,8 +53,8 @@ def tasktime():
...
@@ -53,8 +53,8 @@ def tasktime():
time_current
=
time
.
strftime
(
'
%
A
%
d
%
B
%
Y
%
H:
%
M:
%
S
%
z'
)
time_current
=
time
.
strftime
(
'
%
A
%
d
%
B
%
Y
%
H:
%
M:
%
S
%
z'
)
time_elapsed
=
secondsToStr
(
time
.
time
()
-
tn
)
time_elapsed
=
secondsToStr
(
time
.
time
()
-
tn
)
time_total_elapsed
=
secondsToStr
(
time
.
time
()
-
t0
)
time_total_elapsed
=
secondsToStr
(
time
.
time
()
-
t0
)
display
(
filled
(
'
%
s (
%
s)
%
s
%
s'
%
(
time_current
,
time_elapsed
,
' '
*
7
,
time_total_elapsed
)))
tn
=
time
.
time
()
tn
=
time
.
time
()
return
filled
(
'
%
s (
%
s)
%
s
%
s'
%
(
time_current
,
time_elapsed
,
' '
*
7
,
time_total_elapsed
))
class
CallbackModule
(
CallbackBase
):
class
CallbackModule
(
CallbackBase
):
...
@@ -77,7 +77,7 @@ class CallbackModule(CallbackBase):
...
@@ -77,7 +77,7 @@ class CallbackModule(CallbackBase):
"""
"""
Logs the start of each task
Logs the start of each task
"""
"""
tasktime
(
)
self
.
_display
.
display
(
tasktime
()
)
timestamp
(
self
)
timestamp
(
self
)
# Record the start time of the current task
# Record the start time of the current task
...
@@ -85,11 +85,11 @@ class CallbackModule(CallbackBase):
...
@@ -85,11 +85,11 @@ class CallbackModule(CallbackBase):
self
.
stats
[
self
.
current
]
=
time
.
time
()
self
.
stats
[
self
.
current
]
=
time
.
time
()
def
playbook_on_setup
(
self
):
def
playbook_on_setup
(
self
):
tasktime
(
)
self
.
_display
.
display
(
tasktime
()
)
def
playbook_on_stats
(
self
,
stats
):
def
playbook_on_stats
(
self
,
stats
):
tasktime
(
)
self
.
_display
.
display
(
tasktime
()
)
display
(
filled
(
""
,
fchar
=
"="
))
self
.
_display
.
display
(
filled
(
""
,
fchar
=
"="
))
timestamp
(
self
)
timestamp
(
self
)
...
@@ -105,7 +105,7 @@ class CallbackModule(CallbackBase):
...
@@ -105,7 +105,7 @@ class CallbackModule(CallbackBase):
# Print the timings
# Print the timings
for
name
,
elapsed
in
results
:
for
name
,
elapsed
in
results
:
self
.
display
.
display
(
self
.
_
display
.
display
(
"{0:-<70}{1:->9}"
.
format
(
"{0:-<70}{1:->9}"
.
format
(
'{0} '
.
format
(
name
),
'{0} '
.
format
(
name
),
' {0:.02f}s'
.
format
(
elapsed
),
' {0:.02f}s'
.
format
(
elapsed
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment