Skip to content

Commit 07f7bb6

Browse files
committed
Log workflow execution duration
1 parent 03064e1 commit 07f7bb6

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

alfred-workflow.zip

51 Bytes
Binary file not shown.

workflow/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.9.1
1+
1.9.2

workflow/workflow.py

+5
Original file line numberDiff line numberDiff line change
@@ -1883,6 +1883,8 @@ def run(self, func):
18831883
18841884
"""
18851885

1886+
start = time.time()
1887+
18861888
try:
18871889
func(self)
18881890
except Exception as err:
@@ -1899,6 +1901,9 @@ def run(self, func):
18991901
icon=ICON_ERROR)
19001902
self.send_feedback()
19011903
return 1
1904+
finally:
1905+
self.logger.debug('Workflow finished in {:0.3f} seconds.'.format(
1906+
time.time() - start))
19021907
return 0
19031908

19041909
# Alfred feedback methods ------------------------------------------

0 commit comments

Comments
 (0)