From a0c5648ef4a9361a8b119c6b4bb71eb8a3f87e4b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 29 Sep 2024 21:20:26 -0400 Subject: [PATCH] Changed proto file reader to look for guildpoint as an input --- xml_converter/integration_tests/run_tests.py | 2 +- .../input/pack2/{markers.bin => markers.guildpoint} | 0 .../input/pack2/{markers.bin => markers.guildpoint} | 0 .../input/pack/{markers.bin => markers.guildpoint} | 0 .../input/pack/{markers.bin => markers.guildpoint} | 0 .../input/pack/{markers.bin => markers.guildpoint} | Bin .../input/pack/{markers.bin => markers.guildpoint} | Bin .../input/pack/{markers.bin => markers.guildpoint} | Bin .../input/pack/{markers.bin => markers.guildpoint} | 0 xml_converter/src/xml_converter.cpp | 7 ++++++- 10 files changed, 7 insertions(+), 2 deletions(-) rename xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/{markers.bin => markers.guildpoint} (100%) rename xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/{markers.bin => markers.guildpoint} (100%) rename xml_converter/integration_tests/test_cases/proto_constant_size_on_map/input/pack/{markers.bin => markers.guildpoint} (100%) rename xml_converter/integration_tests/test_cases/proto_hide_category/input/pack/{markers.bin => markers.guildpoint} (100%) rename xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/{markers.bin => markers.guildpoint} (100%) rename xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/{markers.bin => markers.guildpoint} (100%) rename xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/input/pack/{markers.bin => markers.guildpoint} (100%) rename xml_converter/integration_tests/test_cases/proto_type_valid/input/pack/{markers.bin => markers.guildpoint} (100%) diff --git a/xml_converter/integration_tests/run_tests.py b/xml_converter/integration_tests/run_tests.py index f364b2e0..ea3d9208 100755 --- a/xml_converter/integration_tests/run_tests.py +++ b/xml_converter/integration_tests/run_tests.py @@ -124,7 +124,7 @@ def rebuild_xml_converter_binary() -> None: r"^Loading guildpoint pack .*$", r"^The taco parse function took [0-9]+ milliseconds to run$", r"^The xml write function took [0-9]+ milliseconds to run$", - r"^The protobuf read function took [0-9]+ milliseconds to run$", + r"^The protobuf read function took [0-9]+ microseconds to run$", r"^The protobuf write function took [0-9]+ milliseconds to run$", r"^$" ] diff --git a/xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.bin b/xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.guildpoint similarity index 100% rename from xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.bin rename to xml_converter/integration_tests/test_cases/proto_and_xml_input_allow_duplicates/input/pack2/markers.guildpoint diff --git a/xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.bin b/xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.guildpoint similarity index 100% rename from xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.bin rename to xml_converter/integration_tests/test_cases/proto_and_xml_input_no_duplicates/input/pack2/markers.guildpoint diff --git a/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/input/pack/markers.guildpoint similarity index 100% rename from xml_converter/integration_tests/test_cases/proto_constant_size_on_map/input/pack/markers.bin rename to xml_converter/integration_tests/test_cases/proto_constant_size_on_map/input/pack/markers.guildpoint diff --git a/xml_converter/integration_tests/test_cases/proto_hide_category/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_hide_category/input/pack/markers.guildpoint similarity index 100% rename from xml_converter/integration_tests/test_cases/proto_hide_category/input/pack/markers.bin rename to xml_converter/integration_tests/test_cases/proto_hide_category/input/pack/markers.guildpoint diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.guildpoint similarity index 100% rename from xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin rename to xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.guildpoint diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/markers.guildpoint similarity index 100% rename from xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/markers.bin rename to xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/markers.guildpoint diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/input/pack/markers.guildpoint similarity index 100% rename from xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/input/pack/markers.bin rename to xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/input/pack/markers.guildpoint diff --git a/xml_converter/integration_tests/test_cases/proto_type_valid/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_type_valid/input/pack/markers.guildpoint similarity index 100% rename from xml_converter/integration_tests/test_cases/proto_type_valid/input/pack/markers.bin rename to xml_converter/integration_tests/test_cases/proto_type_valid/input/pack/markers.guildpoint diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 7f5c5825..0b3409dd 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -93,7 +93,7 @@ set read_burrito_directory( cout << "Error: " << input_path << " is not an existing directory or file" << endl; } else if (filesystem::is_directory(input_path)) { - vector burrito_files = get_files_by_suffix(input_path, ".bin"); + vector burrito_files = get_files_by_suffix(input_path, ".guildpoint"); for (const string& path : burrito_files) { set category_names = read_protobuf_file(path, input_path, marker_categories, parsed_pois); top_level_categories.insert(category_names.begin(), category_names.end()); @@ -180,6 +180,7 @@ void process_data( cout << "The taco parse function took " << ms << " milliseconds to run" << endl; // Read in all the protobin guildpoint markerpacks + begin = chrono::high_resolution_clock::now(); for (size_t i = 0; i < input_guildpoint_paths.size(); i++) { cout << "Loading guildpoint pack " << input_guildpoint_paths[i] << endl; @@ -194,6 +195,10 @@ void process_data( top_level_categories.insert(category_name); } } + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); + cout << "The protobuf read function took " << ms << " microseconds to run" << endl; if (duplicate_categories.size() > 0) { cout << "The following top level categories were found in more than one pack" << endl;