From 03f589586981083c56bf34e86875e5c59349f28f Mon Sep 17 00:00:00 2001 From: Oskar Thoren Date: Thu, 10 Jan 2019 23:29:46 -0500 Subject: [PATCH] Run for longer and print sync state at end --- data_sync/sync.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/data_sync/sync.py b/data_sync/sync.py index 6137ea4..71a2ff7 100644 --- a/data_sync/sync.py +++ b/data_sync/sync.py @@ -210,8 +210,8 @@ class Node(): self.sync_state[ack][sender.name]["hold_flag"] = 1 def print_sync_state(self): - #log("\n{} POV @{}".format(self.name, self.time)) - #log("-" * 60) + log("\n{} POV @{}".format(self.name, self.time)) + log("-" * 60) n = self.name for message_id, x in self.sync_state.items(): line = message_id[:4] + " | " @@ -335,6 +335,11 @@ def run(steps=10): #b.print_sync_state() #c.print_sync_state() + a.print_sync_state() + b.print_sync_state() + c.print_sync_state() + + # TODO: Move to client # XXX: This confuses things somewhat, as this is # client concerns @@ -430,7 +435,7 @@ ex = {'payload': "hello_world", # Ok let's stop for now -run(10) +run(30) # Scenario: