Rename benchmarks

Summary: new name

Reviewed By: splhack

Differential Revision: D4245765

fbshipit-source-id: c524183ead279ad1d9159a1da2f18fc1b96c2b51
This commit is contained in:
Emil Sjolander
2016-12-02 11:18:12 -08:00
committed by Facebook Github Bot
parent 42b6f6b6e5
commit b9feb10420
2 changed files with 8 additions and 8 deletions

View File

@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
#include "CSSBenchmark.h" #include "YGBenchmark.h"
#include <CSSLayout/CSSLayout.h> #include <CSSLayout/CSSLayout.h>
@@ -22,9 +22,9 @@ static CSSSize _measure(CSSNodeRef node,
}; };
} }
CSS_BENCHMARKS({ YGBENCHMARKS({
CSS_BENCHMARK("Stack with flex", { YGBENCHMARK("Stack with flex", {
const CSSNodeRef root = CSSNodeNew(); const CSSNodeRef root = CSSNodeNew();
CSSNodeStyleSetWidth(root, 100); CSSNodeStyleSetWidth(root, 100);
CSSNodeStyleSetHeight(root, 100); CSSNodeStyleSetHeight(root, 100);
@@ -40,7 +40,7 @@ CSS_BENCHMARKS({
CSSNodeFreeRecursive(root); CSSNodeFreeRecursive(root);
}); });
CSS_BENCHMARK("Align stretch in undefined axis", { YGBENCHMARK("Align stretch in undefined axis", {
const CSSNodeRef root = CSSNodeNew(); const CSSNodeRef root = CSSNodeNew();
for (uint32_t i = 0; i < 10; i++) { for (uint32_t i = 0; i < 10; i++) {
@@ -54,7 +54,7 @@ CSS_BENCHMARKS({
CSSNodeFreeRecursive(root); CSSNodeFreeRecursive(root);
}); });
CSS_BENCHMARK("Nested flex", { YGBENCHMARK("Nested flex", {
const CSSNodeRef root = CSSNodeNew(); const CSSNodeRef root = CSSNodeNew();
for (uint32_t i = 0; i < 10; i++) { for (uint32_t i = 0; i < 10; i++) {
@@ -74,7 +74,7 @@ CSS_BENCHMARKS({
CSSNodeFreeRecursive(root); CSSNodeFreeRecursive(root);
}); });
CSS_BENCHMARK("Huge nested layout", { YGBENCHMARK("Huge nested layout", {
const CSSNodeRef root = CSSNodeNew(); const CSSNodeRef root = CSSNodeNew();
for (uint32_t i = 0; i < 10; i++) { for (uint32_t i = 0; i < 10; i++) {

View File

@@ -17,7 +17,7 @@
#define NUM_REPETITIONS 1000 #define NUM_REPETITIONS 1000
#define CSS_BENCHMARKS(BLOCK) \ #define YGBENCHMARKS(BLOCK) \
int main(int argc, char const *argv[]) { \ int main(int argc, char const *argv[]) { \
clock_t __start; \ clock_t __start; \
clock_t __endTimes[NUM_REPETITIONS]; \ clock_t __endTimes[NUM_REPETITIONS]; \
@@ -25,7 +25,7 @@
return 0; \ return 0; \
} }
#define CSS_BENCHMARK(NAME, BLOCK) \ #define YGBENCHMARK(NAME, BLOCK) \
__start = clock(); \ __start = clock(); \
for (uint32_t __i = 0; __i < NUM_REPETITIONS; __i++) { \ for (uint32_t __i = 0; __i < NUM_REPETITIONS; __i++) { \
{ BLOCK } \ { BLOCK } \