Added the rfl::NoFieldNames processor (#121)

This commit is contained in:
Dr. Patrick Urbanke (劉自成)
2024-06-18 19:23:43 +02:00
committed by GitHub
parent 641ae00b9f
commit 0247c57d5b
46 changed files with 1229 additions and 139 deletions
+48
View File
@@ -84,6 +84,18 @@ static void BM_licenses_write_reflect_cpp_cbor(benchmark::State &state) {
}
BENCHMARK(BM_licenses_write_reflect_cpp_cbor);
static void BM_licenses_write_reflect_cpp_cbor_without_field_names(
benchmark::State &state) {
const auto data = load_data();
for (auto _ : state) {
const auto output = rfl::cbor::write<rfl::NoFieldNames>(data);
if (output.size() == 0) {
std::cout << "No output" << std::endl;
}
}
}
BENCHMARK(BM_licenses_write_reflect_cpp_cbor_without_field_names);
static void BM_licenses_write_reflect_cpp_flexbuf(benchmark::State &state) {
const auto data = load_data();
for (auto _ : state) {
@@ -95,6 +107,18 @@ static void BM_licenses_write_reflect_cpp_flexbuf(benchmark::State &state) {
}
BENCHMARK(BM_licenses_write_reflect_cpp_flexbuf);
static void BM_licenses_write_reflect_cpp_flexbuf_without_field_names(
benchmark::State &state) {
const auto data = load_data();
for (auto _ : state) {
const auto output = rfl::flexbuf::write<rfl::NoFieldNames>(data);
if (output.size() == 0) {
std::cout << "No output" << std::endl;
}
}
}
BENCHMARK(BM_licenses_write_reflect_cpp_flexbuf_without_field_names);
static void BM_licenses_write_reflect_cpp_json(benchmark::State &state) {
const auto data = load_data();
for (auto _ : state) {
@@ -106,6 +130,18 @@ static void BM_licenses_write_reflect_cpp_json(benchmark::State &state) {
}
BENCHMARK(BM_licenses_write_reflect_cpp_json);
static void BM_licenses_write_reflect_cpp_json_without_field_names(
benchmark::State &state) {
const auto data = load_data();
for (auto _ : state) {
const auto output = rfl::json::write<rfl::NoFieldNames>(data);
if (output.size() == 0) {
std::cout << "No output" << std::endl;
}
}
}
BENCHMARK(BM_licenses_write_reflect_cpp_json_without_field_names);
static void BM_licenses_write_reflect_cpp_msgpack(benchmark::State &state) {
const auto data = load_data();
for (auto _ : state) {
@@ -117,6 +153,18 @@ static void BM_licenses_write_reflect_cpp_msgpack(benchmark::State &state) {
}
BENCHMARK(BM_licenses_write_reflect_cpp_msgpack);
static void BM_licenses_write_reflect_cpp_msgpack_without_field_names(
benchmark::State &state) {
const auto data = load_data();
for (auto _ : state) {
const auto output = rfl::msgpack::write<rfl::NoFieldNames>(data);
if (output.size() == 0) {
std::cout << "No output" << std::endl;
}
}
}
BENCHMARK(BM_licenses_write_reflect_cpp_msgpack_without_field_names);
static void BM_licenses_write_reflect_cpp_toml(benchmark::State &state) {
const auto data = load_data();
for (auto _ : state) {