main() function to run a benchmark (#1564)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1564 tsia Reviewed By: NickGerleman Differential Revision: D53028962 fbshipit-source-id: dee2670eaa4fe0ab8b6e2b9e1bbe4356bb2c0735
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8dbf55f230
commit
94960f123e
@@ -391,6 +391,14 @@ void benchmark(std::filesystem::path& capturesDir) {
|
|||||||
|
|
||||||
} // namespace facebook::yoga
|
} // 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user