diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/memory/benchmark | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/memory/benchmark')
-rw-r--r-- | util/memory/benchmark/pool/main.cpp | 20 | ||||
-rw-r--r-- | util/memory/benchmark/ya.make | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/util/memory/benchmark/pool/main.cpp b/util/memory/benchmark/pool/main.cpp index 0b4d6c94af..1dcbc55b7b 100644 --- a/util/memory/benchmark/pool/main.cpp +++ b/util/memory/benchmark/pool/main.cpp @@ -4,17 +4,17 @@ #include <util/generic/xrange.h> #include <util/stream/output.h> -#define BENCHMARK_POOL_ALLOC(chunkSize, allocSize, allocAlign) \ +#define BENCHMARK_POOL_ALLOC(chunkSize, allocSize, allocAlign) \ Y_CPU_BENCHMARK(MemroyPool_chunk##chunkSize##_alloc##allocSize##_align##allocAlign, p) { \ - TMemoryPool pool(chunkSize); \ - for (auto i : xrange<size_t>(0, p.Iterations())) { \ - (void)i; \ - Y_DO_NOT_OPTIMIZE_AWAY(pool.Allocate(allocSize, allocAlign)); \ - } \ - /* \ - Cerr << "Allocated: " << pool.MemoryAllocated() << Endl; \ - Cerr << "Waste: " << pool.MemoryWaste() << Endl; \ - */ \ + TMemoryPool pool(chunkSize); \ + for (auto i : xrange<size_t>(0, p.Iterations())) { \ + (void)i; \ + Y_DO_NOT_OPTIMIZE_AWAY(pool.Allocate(allocSize, allocAlign)); \ + } \ + /* \ + Cerr << "Allocated: " << pool.MemoryAllocated() << Endl; \ + Cerr << "Waste: " << pool.MemoryWaste() << Endl; \ + */ \ } BENCHMARK_POOL_ALLOC(4096, 1, 1) diff --git a/util/memory/benchmark/ya.make b/util/memory/benchmark/ya.make index 2259b9434e..f81bb6de21 100644 --- a/util/memory/benchmark/ya.make +++ b/util/memory/benchmark/ya.make @@ -3,5 +3,5 @@ SUBSCRIBER(g:util-subscribers) RECURSE( pool - pool/metrics + pool/metrics ) |