Skip to content

Commit

Permalink
Add duration to test_script.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lepapareil authored and hurl-bot committed Jan 21, 2025
1 parent 0cf921d commit 617a7c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integration/test_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import re
import subprocess
import sys
import time


def decode_string(encoded: bytes) -> str:
Expand All @@ -32,7 +33,10 @@ def test(script_file: str):
else:
cmd = [script_file]
print(" ".join(cmd))
start_time = time.time()
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
execution_time = time.time() - start_time
print(f" - Duration: {execution_time} seconds")

basename = os.path.splitext(script_file)[0]

Expand Down

0 comments on commit 617a7c5

Please sign in to comment.