turn off measuring node_states
This commit is contained in:
parent
d5b126364b
commit
b18191b11c
|
@ -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)
|
||||
|
|
|
@ -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 = []
|
||||
|
|
Loading…
Reference in New Issue