Skip to content

Commit

Permalink
names
Browse files Browse the repository at this point in the history
  • Loading branch information
grisumbras committed Jan 30, 2025
1 parent cd82951 commit eaf16a0
Showing 1 changed file with 30 additions and 16 deletions.
46 changes: 30 additions & 16 deletions bench/bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ class any_impl

any_impl(
string_view base_name,
string_view flavor,
bool is_boost,
bool is_pool,
bool with_file_io,
Expand Down Expand Up @@ -315,6 +316,13 @@ class any_impl
extra = "pool" + extra;
}

if( !flavor.empty() )
{
if( !extra.empty() )
extra = '+' + extra;
extra.insert( extra.begin(), flavor.begin(), flavor.end() );
}

if( !extra.empty() )
extra = " (" + extra + ')';

Expand Down Expand Up @@ -552,17 +560,25 @@ class base_boost_impl : public any_impl

public:
base_boost_impl(
string_view base_name,
string_view flavor,
bool is_pool,
bool with_file_io,
bool with_conversion,
parse_options const& popts)
: any_impl(
base_name, true, is_pool, with_file_io, with_conversion, popts)
"boost",
flavor,
true,
is_pool,
with_file_io,
with_conversion,
popts)
, is_pool_(is_pool)
{}
};

//----------------------------------------------------------

class boost_impl : public base_boost_impl
{
public:
Expand All @@ -571,8 +587,7 @@ class boost_impl : public base_boost_impl
bool with_file_io,
bool with_conversion,
parse_options const& popts)
: base_boost_impl(
"boost", is_pool, with_file_io, with_conversion, popts)
: base_boost_impl("", is_pool, with_file_io, with_conversion, popts)
{}

clock_type::duration
Expand Down Expand Up @@ -747,7 +762,7 @@ class boost_null_impl : public any_impl
boost_null_impl(
bool with_file_io, bool with_conversion, parse_options const& popts)
: any_impl(
"boost (null)", true, false, with_file_io, with_conversion, popts)
"boost", "null", true, false, with_file_io, with_conversion, popts)
{}

clock_type::duration
Expand Down Expand Up @@ -828,11 +843,7 @@ class boost_simple_impl : public base_boost_impl
bool with_conversion,
parse_options const& popts)
: base_boost_impl(
"boost (convenient)",
is_pool,
with_file_io,
with_conversion,
popts)
"convenient", is_pool, with_file_io, with_conversion, popts)
{}

clock_type::duration
Expand Down Expand Up @@ -893,6 +904,8 @@ class boost_simple_impl : public base_boost_impl
}
};

//----------------------------------------------------------

class boost_operator_impl : public base_boost_impl
{
bool is_pool_;
Expand All @@ -904,11 +917,7 @@ class boost_operator_impl : public base_boost_impl
bool with_conversion,
parse_options const& popts)
: base_boost_impl(
"boost (operators)",
is_pool,
with_file_io,
with_conversion,
popts)
"operators", is_pool, with_file_io, with_conversion, popts)
{}

clock_type::duration
Expand Down Expand Up @@ -980,6 +989,8 @@ class boost_operator_impl : public base_boost_impl
}
};

//----------------------------------------------------------

class boost_direct_impl : public any_impl
{
struct string_parser
Expand Down Expand Up @@ -1095,7 +1106,8 @@ class boost_direct_impl : public any_impl
boost_direct_impl(
bool with_file_io, bool with_conversion, parse_options const& popts)
: any_impl(
"boost (direct)",
"boost",
"direct",
true,
false,
with_file_io,
Expand Down Expand Up @@ -1156,6 +1168,7 @@ struct rapidjson_impl : public any_impl
rapidjson_impl(bool with_file_io, bool with_conversion)
: any_impl(
"rapidjson",
"",
false,
std::is_same<Allocator, RAPIDJSON_DEFAULT_ALLOCATOR>::value,
with_file_io,
Expand Down Expand Up @@ -1239,6 +1252,7 @@ struct nlohmann_impl : public any_impl
nlohmann_impl(bool with_file_io, bool with_conversion)
: any_impl(
"nlohmann",
"",
false,
false,
with_file_io,
Expand Down

0 comments on commit eaf16a0

Please sign in to comment.