Skip to content

Commit

Permalink
Stop printing pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Devesh Sarda committed Feb 13, 2024
1 parent b3b5019 commit 8fcdec0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion simulator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def main():
num_pages_read = sampler.perform_sampling_for_node(curr_node)
if num_pages_read > 0:
pages_loaded.append(num_pages_read)
print("Got result for", len(pages_loaded), "nodes out of", len(nodes_to_sample), "nodes")

# Save the histogram
os.makedirs(os.path.dirname(arguments.save_path), exist_ok=True)
Expand Down
3 changes: 1 addition & 2 deletions simulator/src/features_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ def __init__(self, data_loader, features_stat):
random.shuffle(self.node_location_map)

def get_node_page(self, node_id):
node_location = self.node_location_map[node_id]
return int(node_location / self.nodes_per_page)
return int(self.node_location_map[node_id] / self.nodes_per_page)

def get_total_file_size(self):
total_bytes = self.page_size * self.total_pages
Expand Down

0 comments on commit 8fcdec0

Please sign in to comment.