Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1569 Added a `benchmark` function that takes a path representing a directory to read captures from. This is supplied by the caller due to annoyance with filesystem access in C++. This calls into timing code with <chrono> and prints it out to the console. Reviewed By: NickGerleman Differential Revision: D53104632 fbshipit-source-id: fe8bcb0a87198701865fb04193894591d2eff821
21 lines
443 B
C++
21 lines
443 B
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <chrono>
|
|
#include <string>
|
|
|
|
namespace facebook::yoga {
|
|
|
|
struct BenchmarkResult {
|
|
std::chrono::steady_clock::duration treeCreationDuration;
|
|
std::chrono::steady_clock::duration layoutDuration;
|
|
};
|
|
|
|
} // namespace facebook::yoga
|