Skip to content

Commit

Permalink
main() function to run a benchmark (#1564)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1564

tsia

Reviewed By: NickGerleman

Differential Revision: D53028962

fbshipit-source-id: dee2670eaa4fe0ab8b6e2b9e1bbe4356bb2c0735
  • Loading branch information
joevilches authored and facebook-github-bot committed Feb 5, 2024
1 parent 8dbf55f commit 94960f1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion benchmark/Benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,14 @@ void benchmark(std::filesystem::path& capturesDir) {

} // namespace facebook::yoga

int main() {
int main(int argc, char* argv[]) {
if (argc == 2) {
std::filesystem::path capturesDir = argv[argc - 1];
facebook::yoga::benchmark(capturesDir);
} else {
throw std::invalid_argument("Expecting a path as an argument");
return 1;
}

return 0;
}

0 comments on commit 94960f1

Please sign in to comment.