mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #26611 from lyft/include-duration-in-log-statement
Include duration in log statement.
This commit is contained in:
commit
e8277f4c67
@ -1646,8 +1646,9 @@ class State(object):
|
||||
ret['start_time'] = start_time.time().isoformat()
|
||||
delta = (finish_time - start_time)
|
||||
# duration in milliseconds.microseconds
|
||||
ret['duration'] = (delta.seconds * 1000000 + delta.microseconds)/1000.0
|
||||
log.info('Completed state [{0}] at time {1}'.format(low['name'], finish_time.time().isoformat()))
|
||||
duration = (delta.seconds * 1000000 + delta.microseconds)/1000.0
|
||||
ret['duration'] = duration
|
||||
log.info('Completed state [{0}] at time {1} duration_in_ms={2}'.format(low['name'], finish_time.time().isoformat(), duration))
|
||||
return ret
|
||||
|
||||
def call_chunks(self, chunks):
|
||||
|
Loading…
Reference in New Issue
Block a user