diff --git a/benchmark/CSSBenchmark.c b/benchmark/YGBenchmark.c similarity index 94% rename from benchmark/CSSBenchmark.c rename to benchmark/YGBenchmark.c index 79499f29..22d639d8 100644 --- a/benchmark/CSSBenchmark.c +++ b/benchmark/YGBenchmark.c @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -#include "CSSBenchmark.h" +#include "YGBenchmark.h" #include @@ -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(); CSSNodeStyleSetWidth(root, 100); CSSNodeStyleSetHeight(root, 100); @@ -40,7 +40,7 @@ CSS_BENCHMARKS({ CSSNodeFreeRecursive(root); }); - CSS_BENCHMARK("Align stretch in undefined axis", { + YGBENCHMARK("Align stretch in undefined axis", { const CSSNodeRef root = CSSNodeNew(); for (uint32_t i = 0; i < 10; i++) { @@ -54,7 +54,7 @@ CSS_BENCHMARKS({ CSSNodeFreeRecursive(root); }); - CSS_BENCHMARK("Nested flex", { + YGBENCHMARK("Nested flex", { const CSSNodeRef root = CSSNodeNew(); for (uint32_t i = 0; i < 10; i++) { @@ -74,7 +74,7 @@ CSS_BENCHMARKS({ CSSNodeFreeRecursive(root); }); - CSS_BENCHMARK("Huge nested layout", { + YGBENCHMARK("Huge nested layout", { const CSSNodeRef root = CSSNodeNew(); for (uint32_t i = 0; i < 10; i++) { diff --git a/benchmark/CSSBenchmark.h b/benchmark/YGBenchmark.h similarity index 95% rename from benchmark/CSSBenchmark.h rename to benchmark/YGBenchmark.h index f1314e98..4ebd2841 100644 --- a/benchmark/CSSBenchmark.h +++ b/benchmark/YGBenchmark.h @@ -17,7 +17,7 @@ #define NUM_REPETITIONS 1000 -#define CSS_BENCHMARKS(BLOCK) \ +#define YGBENCHMARKS(BLOCK) \ int main(int argc, char const *argv[]) { \ clock_t __start; \ clock_t __endTimes[NUM_REPETITIONS]; \ @@ -25,7 +25,7 @@ return 0; \ } -#define CSS_BENCHMARK(NAME, BLOCK) \ +#define YGBENCHMARK(NAME, BLOCK) \ __start = clock(); \ for (uint32_t __i = 0; __i < NUM_REPETITIONS; __i++) { \ { BLOCK } \