Skip to content

Commit

Permalink
dev: log duration when running test requests
Browse files Browse the repository at this point in the history
  • Loading branch information
quitrk committed Sep 30, 2024
1 parent 9b3344f commit 046c62a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion run-skynet-requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,22 @@ async def get(job_id):
await asyncio.sleep(1)

success = True
total_duration = 0

# get the results of the jobs
for job_id in ids:
response = await get(job_id)
status = response['status']
print(f'Job {job_id} status: {status}\n')
duration = response['duration']
total_duration += duration

print(f'Job {job_id} status: {status} duration: {duration} \n')

if status != 'success':
success = False

print(f'Total duration: {total_duration}')

await session.close()

exit(1 if not success else 0)
Expand Down

0 comments on commit 046c62a

Please sign in to comment.