Skip to content

Commit

Permalink
Changed proto file reader to look for guildpoint as an input
Browse files Browse the repository at this point in the history
  • Loading branch information
klingbolt committed Sep 30, 2024
1 parent df32cf0 commit a0c5648
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xml_converter/integration_tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"^$"
]
Expand Down
7 changes: 6 additions & 1 deletion xml_converter/src/xml_converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ set<string> read_burrito_directory(
cout << "Error: " << input_path << " is not an existing directory or file" << endl;
}
else if (filesystem::is_directory(input_path)) {
vector<string> burrito_files = get_files_by_suffix(input_path, ".bin");
vector<string> burrito_files = get_files_by_suffix(input_path, ".guildpoint");
for (const string& path : burrito_files) {
set<string> category_names = read_protobuf_file(path, input_path, marker_categories, parsed_pois);
top_level_categories.insert(category_names.begin(), category_names.end());
Expand Down Expand Up @@ -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;

Expand All @@ -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<std::chrono::microseconds>(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;
Expand Down

0 comments on commit a0c5648

Please sign in to comment.