aboutsummaryrefslogtreecommitdiffstats
path: root/util/charset/benchmark
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /util/charset/benchmark
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/charset/benchmark')
-rw-r--r--util/charset/benchmark/to_lower/main.cpp68
-rw-r--r--util/charset/benchmark/to_lower/metrics/main.py10
-rw-r--r--util/charset/benchmark/to_lower/metrics/ya.make26
-rw-r--r--util/charset/benchmark/to_lower/ya.make18
-rw-r--r--util/charset/benchmark/utf8_to_wide/main.cpp2
-rw-r--r--util/charset/benchmark/utf8_to_wide/metrics/main.py10
-rw-r--r--util/charset/benchmark/utf8_to_wide/metrics/ya.make26
-rw-r--r--util/charset/benchmark/ya.make20
8 files changed, 90 insertions, 90 deletions
diff --git a/util/charset/benchmark/to_lower/main.cpp b/util/charset/benchmark/to_lower/main.cpp
index 30260e532d..e95fdc2371 100644
--- a/util/charset/benchmark/to_lower/main.cpp
+++ b/util/charset/benchmark/to_lower/main.cpp
@@ -1,25 +1,25 @@
#include <library/cpp/testing/benchmark/bench.h>
-
-#include <util/charset/wide.h>
-#include <util/generic/singleton.h>
-#include <util/generic/vector.h>
-#include <util/generic/string.h>
-
-static const auto ShortAscii = UTF8ToWide("hELlo");
-static const auto LongAscii = UTF8ToWide(
- "The first plane, plane 0, the Basic Multilingual Plane (BMP) contains characters for almost "
- "all modern languages, and a large number of symbols. A primary objective for the BMP is to "
- "support the unification of prior character sets as well as characters for writing. Most of "
- "the assigned code points in the BMP are used to encode Chinese, Japanese, and Korean (CJK) "
- "characters.");
-
-static const auto ShortRussian = UTF8ToWide("пРИвет");
-static const auto LongRussian = UTF8ToWide(
- "Плоскость 0 (Основная многоязычная плоскость, англ. Basic Multilingual Plane, BMP) отведена "
- "для символов практически всех современных письменностей и большого числа специальных символов. "
- "Большая часть таблицы занята китайско-японскими иероглифами и своеобразными корейскими"
- "буквами. В Юникоде 10.0 в этой плоскости представлены следующие блоки");
-
+
+#include <util/charset/wide.h>
+#include <util/generic/singleton.h>
+#include <util/generic/vector.h>
+#include <util/generic/string.h>
+
+static const auto ShortAscii = UTF8ToWide("hELlo");
+static const auto LongAscii = UTF8ToWide(
+ "The first plane, plane 0, the Basic Multilingual Plane (BMP) contains characters for almost "
+ "all modern languages, and a large number of symbols. A primary objective for the BMP is to "
+ "support the unification of prior character sets as well as characters for writing. Most of "
+ "the assigned code points in the BMP are used to encode Chinese, Japanese, and Korean (CJK) "
+ "characters.");
+
+static const auto ShortRussian = UTF8ToWide("пРИвет");
+static const auto LongRussian = UTF8ToWide(
+ "Плоскость 0 (Основная многоязычная плоскость, англ. Basic Multilingual Plane, BMP) отведена "
+ "для символов практически всех современных письменностей и большого числа специальных символов. "
+ "Большая часть таблицы занята китайско-японскими иероглифами и своеобразными корейскими"
+ "буквами. В Юникоде 10.0 в этой плоскости представлены следующие блоки");
+
#define DEFINE_INPLACE_BENCH(s) \
Y_CPU_BENCHMARK(s##CopyDetach, iface) { \
for (size_t i = 0, iEnd = iface.Iterations(); i < iEnd; ++i) { \
@@ -38,8 +38,8 @@ static const auto LongRussian = UTF8ToWide(
NBench::Escape(copy.data()); \
NBench::Clobber(); \
} \
- }
-
+ }
+
#define DEFINE_RET_BENCH(s) \
Y_CPU_BENCHMARK(s##Ret, iface) { \
for (size_t i = 0, iEnd = iface.Iterations(); i < iEnd; ++i) { \
@@ -48,14 +48,14 @@ static const auto LongRussian = UTF8ToWide(
NBench::Escape(res.data()); \
NBench::Clobber(); \
} \
- }
-
-DEFINE_INPLACE_BENCH(ShortAscii)
-DEFINE_INPLACE_BENCH(LongAscii)
-DEFINE_INPLACE_BENCH(ShortRussian)
-DEFINE_INPLACE_BENCH(LongRussian)
-
-DEFINE_RET_BENCH(ShortAscii)
-DEFINE_RET_BENCH(LongAscii)
-DEFINE_RET_BENCH(ShortRussian)
-DEFINE_RET_BENCH(LongRussian)
+ }
+
+DEFINE_INPLACE_BENCH(ShortAscii)
+DEFINE_INPLACE_BENCH(LongAscii)
+DEFINE_INPLACE_BENCH(ShortRussian)
+DEFINE_INPLACE_BENCH(LongRussian)
+
+DEFINE_RET_BENCH(ShortAscii)
+DEFINE_RET_BENCH(LongAscii)
+DEFINE_RET_BENCH(ShortRussian)
+DEFINE_RET_BENCH(LongRussian)
diff --git a/util/charset/benchmark/to_lower/metrics/main.py b/util/charset/benchmark/to_lower/metrics/main.py
index d6a4625fa6..e7495d432b 100644
--- a/util/charset/benchmark/to_lower/metrics/main.py
+++ b/util/charset/benchmark/to_lower/metrics/main.py
@@ -1,5 +1,5 @@
-import yatest.common as yc
-
-
-def test_export_metrics(metrics):
- metrics.set_benchmark(yc.execute_benchmark('util/charset/benchmark/to_lower/to_lower'))
+import yatest.common as yc
+
+
+def test_export_metrics(metrics):
+ metrics.set_benchmark(yc.execute_benchmark('util/charset/benchmark/to_lower/to_lower'))
diff --git a/util/charset/benchmark/to_lower/metrics/ya.make b/util/charset/benchmark/to_lower/metrics/ya.make
index 675cdb7aab..5bb3461a8d 100644
--- a/util/charset/benchmark/to_lower/metrics/ya.make
+++ b/util/charset/benchmark/to_lower/metrics/ya.make
@@ -1,21 +1,21 @@
-OWNER(
- agorodilov
+OWNER(
+ agorodilov
g:util
-)
+)
SUBSCRIBER(g:util-subscribers)
-
+
PY2TEST()
-
+
SIZE(LARGE)
-
-TAG(
+
+TAG(
ya:force_sandbox
- sb:intel_e5_2660v1
+ sb:intel_e5_2660v1
ya:fat
-)
-
+)
+
TEST_SRCS(main.py)
-
+
DEPENDS(util/charset/benchmark/to_lower)
-
-END()
+
+END()
diff --git a/util/charset/benchmark/to_lower/ya.make b/util/charset/benchmark/to_lower/ya.make
index 2de20e626d..74c47e6de5 100644
--- a/util/charset/benchmark/to_lower/ya.make
+++ b/util/charset/benchmark/to_lower/ya.make
@@ -1,11 +1,11 @@
OWNER(yazevnul)
-
+
Y_BENCHMARK()
-
-ALLOCATOR(B)
-
-SRCS(
- main.cpp
-)
-
-END()
+
+ALLOCATOR(B)
+
+SRCS(
+ main.cpp
+)
+
+END()
diff --git a/util/charset/benchmark/utf8_to_wide/main.cpp b/util/charset/benchmark/utf8_to_wide/main.cpp
index bdd234bfc6..09fa567fe5 100644
--- a/util/charset/benchmark/utf8_to_wide/main.cpp
+++ b/util/charset/benchmark/utf8_to_wide/main.cpp
@@ -12,7 +12,7 @@ namespace {
template <size_t N>
struct TRandomAsciiString: public TVector<char> {
inline TRandomAsciiString() {
- reserve(N);
+ reserve(N);
for (size_t i = 0; i < N; ++i) {
push_back(RandomNumber<char>(127));
}
diff --git a/util/charset/benchmark/utf8_to_wide/metrics/main.py b/util/charset/benchmark/utf8_to_wide/metrics/main.py
index adadfac791..ffbd8f68fd 100644
--- a/util/charset/benchmark/utf8_to_wide/metrics/main.py
+++ b/util/charset/benchmark/utf8_to_wide/metrics/main.py
@@ -1,5 +1,5 @@
-import yatest.common as yc
-
-
-def test_export_metrics(metrics):
- metrics.set_benchmark(yc.execute_benchmark('util/charset/benchmark/utf8_to_wide/utf8_to_wide'))
+import yatest.common as yc
+
+
+def test_export_metrics(metrics):
+ metrics.set_benchmark(yc.execute_benchmark('util/charset/benchmark/utf8_to_wide/utf8_to_wide'))
diff --git a/util/charset/benchmark/utf8_to_wide/metrics/ya.make b/util/charset/benchmark/utf8_to_wide/metrics/ya.make
index 997c41fbca..c406e25bee 100644
--- a/util/charset/benchmark/utf8_to_wide/metrics/ya.make
+++ b/util/charset/benchmark/utf8_to_wide/metrics/ya.make
@@ -1,21 +1,21 @@
-OWNER(
- agorodilov
+OWNER(
+ agorodilov
g:util
-)
+)
SUBSCRIBER(g:util-subscribers)
-
+
PY2TEST()
-
+
SIZE(LARGE)
-
-TAG(
+
+TAG(
ya:force_sandbox
- sb:intel_e5_2660v1
+ sb:intel_e5_2660v1
ya:fat
-)
-
+)
+
TEST_SRCS(main.py)
-
+
DEPENDS(util/charset/benchmark/utf8_to_wide)
-
-END()
+
+END()
diff --git a/util/charset/benchmark/ya.make b/util/charset/benchmark/ya.make
index 9344fc3904..de3e04ef22 100644
--- a/util/charset/benchmark/ya.make
+++ b/util/charset/benchmark/ya.make
@@ -1,12 +1,12 @@
-OWNER(
- agorodilov
+OWNER(
+ agorodilov
g:util
-)
+)
SUBSCRIBER(g:util-subscribers)
-
-RECURSE(
- to_lower
- to_lower/metrics
- utf8_to_wide
- utf8_to_wide/metrics
-)
+
+RECURSE(
+ to_lower
+ to_lower/metrics
+ utf8_to_wide
+ utf8_to_wide/metrics
+)