turn off measuring node_states

This commit is contained in:
Youngjoon Lee 2024-05-24 16:48:39 +09:00
parent d5b126364b
commit b18191b11c
No known key found for this signature in database
GPG Key ID: 09B750B5BD6F08A2
2 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ class Adversary:
self.message_sizes = []
self.senders_around_interval = defaultdict(int)
self.mixed_msgs_per_window = []
self.node_states = defaultdict(dict)
# self.node_states = defaultdict(dict)
self.env.process(self.update_observation_window())
@ -31,14 +31,14 @@ class Adversary:
def observe_incoming_message(self, node: "Node"):
self.mixed_msgs_per_window[-1][node] += 1
if node not in self.node_states[self.env.now]:
self.node_states[self.env.now][node] = NodeState.RECEIVING
# if node not in self.node_states[self.env.now]:
# self.node_states[self.env.now][node] = NodeState.RECEIVING
def observe_outgoing_message(self, node: "Node"):
self.mixed_msgs_per_window[-1][node] -= 1
if self.is_around_message_interval(self.env.now):
self.senders_around_interval[node] += 1
self.node_states[self.env.now][node] = NodeState.SENDING
# self.node_states[self.env.now][node] = NodeState.SENDING
def is_around_message_interval(self, time: SimTime):
now_frac, now_int = math.modf(time)

View File

@ -18,7 +18,7 @@ class Analysis:
self.messages_emitted_around_interval()
if self.config.mixnet.is_mixing_on():
self.mixed_messages_per_node_over_time()
self.node_states()
# self.node_states()
def bandwidth(self, message_size_df: pd.DataFrame):
dataframes = []