From 779ab96ffebc687bc41544b02432061110d9bfc2 Mon Sep 17 00:00:00 2001 From: Mathias Gug Date: Mon, 24 Aug 2015 10:27:21 -0700 Subject: [PATCH] Include duration in log statement. --- salt/state.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/salt/state.py b/salt/state.py index a993d61a4c..cb331a0d82 100644 --- a/salt/state.py +++ b/salt/state.py @@ -1636,8 +1636,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):