Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1566 In the previous diffs we serialized the in-memory representation of a node into json. This diff exposes a `generateBenchmark` method that reads from that json executes the proper public Yoga API functions to recreate the same tree. It then calls calculate layout so that we can time that in the next diff. This diff is really only focusing on the core aspects of a yoga tree like style, children, and calculating layout; there are still more things to add coming up: * Support for configs, experiments, and errata * Support for measure functions * Support for general node state that is not style (like always forming a containing block) * Actually running all of these benchmarks together * Tests Reviewed By: NickGerleman Differential Revision: D52987588 fbshipit-source-id: 7f7c9ca9956f693be62bc5e3cebdf1aed6f58aec
18 lines
371 B
C++
18 lines
371 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 <filesystem>
|
|
#include <string>
|
|
|
|
namespace facebook::yoga {
|
|
|
|
void generateBenchmark(const std::filesystem::path& capturePath);
|
|
|
|
} // namespace facebook::yoga
|