Skip to content

Commit 5d2047d

Browse files
committed
show elapsed vs timeout
1 parent 1e8bb68 commit 5d2047d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ If you now try and run:
8383
(lambduh) $ lambda invoke
8484
# 5.858
8585
86-
# your code completed in: 0.00000310s
86+
# execution time: 0.00000310s
87+
# function execution timeout: 15s
8788
8889
As you probably put together, the ``lambda invoke`` command grabs the values stored in the ``event.json`` file and passes them to your function.
8990

aws_lambda/aws_lambda.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,11 @@ def invoke(src, alt_event=None):
8282
results = fn(event, None)
8383
end = time.time()
8484
elapsed = end - start
85+
timeout = cfg.get('timeout', 15)
86+
8587
print("{0}".format(results))
86-
print("\nyour code completed in: {:.8f}s".format(elapsed))
88+
print("\nexecution time: {:.8f}s\nfunction execution "
89+
"timeout: {:2}s".format(elapsed, timeout))
8790

8891

8992
def init(src, minimal=False):

0 commit comments

Comments
 (0)