Skip to content

Commit

Permalink
Print duration of callback app (#885)
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Chang <[email protected]>
  • Loading branch information
mocsharp authored Oct 5, 2023
1 parent 387803f commit a4c63ac
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/TaskManager/CallbackApp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import pika
import uuid

from time import perf_counter as pc

def main():
parser = argparse.ArgumentParser()
Expand Down Expand Up @@ -50,4 +51,9 @@ def main():
print('Message sent.')

if __name__ == "__main__":
main()
t0 = pc()
try:
main()
except Exception as e:
print(e)
print(f"Duration: {pc()-t0}")

0 comments on commit a4c63ac

Please sign in to comment.