Skip to content

Commit

Permalink
display elapsed time
Browse files Browse the repository at this point in the history
  • Loading branch information
daejunpark committed Nov 20, 2024
1 parent ca712f2 commit c0785fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/halmos/sevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from collections.abc import Callable, Iterator
from copy import deepcopy
from dataclasses import dataclass, field
from datetime import timedelta
from functools import reduce
from timeit import default_timer as timer
from typing import (
Expand Down Expand Up @@ -2669,8 +2670,12 @@ def finalize(ex: Exec):
if step_id % PULSE_INTERVAL == 0:
elapsed = timer() - stack.start_time
speed = step_id / elapsed

# hh:mm:ss
elapsed_fmt = str(timedelta(seconds=elapsed)).split(".")[0]

status.update(
f"pulse: {step_id} ops ({speed:.2f} ops/s) | "
f"pulse: [{elapsed_fmt}] {step_id} ops ({speed:.2f} ops/s) | "
f"completed paths: {stack.completed_paths} | outstanding paths: {len(stack)}"
)

Expand Down

0 comments on commit c0785fd

Please sign in to comment.