Skip to content

Commit

Permalink
performance demo fix
Browse files Browse the repository at this point in the history
Signed-off-by: Shaanjot Gill <[email protected]>
  • Loading branch information
shaangill025 committed Feb 28, 2023
1 parent aea1e3a commit 3c9bdc9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions demo/runners/performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,15 @@ async def check_received_creds(self) -> Tuple[int, int]:
pending = 0
total = len(self.credential_state)
for result in self.credential_state.values():
if result != "done" and result != "credential_acked":
# Since cred_ex_record is set to be auto-removed
# the state in self.credential_state for completed
# exchanges will be deleted. Any problematic
# exchanges will be in abandoned state.
if (
result != "done"
and result != "deleted"
and result != "credential_acked"
):
pending += 1
if self.credential_event.is_set():
continue
Expand Down Expand Up @@ -422,7 +430,7 @@ async def check_received_creds(agent, issue_count, pb):
pending, total = await agent.check_received_creds()
complete = total - pending
if reported == complete:
await asyncio.wait_for(agent.update_creds(), 30)
await asyncio.wait_for(agent.update_creds(), 45)
continue
if iter_pb and complete > reported:
try:
Expand Down
2 changes: 1 addition & 1 deletion demo/runners/support/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def _terminate(self):
if self.proc and self.proc.poll() is None:
self.proc.terminate()
try:
self.proc.wait(timeout=0.5)
self.proc.wait(timeout=1.5)
self.log(f"Exited with return code {self.proc.returncode}")
except subprocess.TimeoutExpired:
msg = "Process did not terminate in time"
Expand Down

0 comments on commit 3c9bdc9

Please sign in to comment.