When running performance_bin commands in tutorial, if the path of --states argument doesn't end with /, the command fails:
# This fails
bazel-bin/performance/performance_bin \
--states samples/simple-coin/out/run_2024-05-07_23-46-17 \
--source samples/simple-coin/CoinToss.json
# This works
bazel-bin/performance/performance_bin \
--states samples/simple-coin/out/run_2024-05-07_23-46-17/ \
--source samples/simple-coin/CoinToss.json
The root cause is:
|
pattern = os.path.join(f"{path_prefix}*adjacency_lists_*.pb") |
|
links = graph.Links() |
|
return load_proto_files(pattern, links) |
|
|
|
|
|
def load_nodes_from_proto_files(path_prefix): |
|
pattern = os.path.join(f"{path_prefix}*nodes_*.pb") |
A potential fix:
def load_adj_lists_from_proto_files(path_prefix):
pattern = os.path.join(path_prefix, "adjacency_lists_*.pb")
links = graph.Links()
return load_proto_files(pattern, links)
def load_nodes_from_proto_files(path_prefix):
pattern = os.path.join(path_prefix, "nodes_*.pb")
pb = graph.Nodes()
return load_proto_files(pattern, pb)
When running
performance_bincommands in tutorial, if the path of--statesargument doesn't end with/, the command fails:The root cause is:
fizzbee/performance/files.py
Lines 40 to 46 in 7004a5e
A potential fix: