Remove public: from structs
This commit is contained in:
parent
f071a15591
commit
2d760e75dc
|
@ -10,7 +10,6 @@ template<typename I>
|
|||
struct runner : public json_benchmark::file_runner<I> {
|
||||
std::vector<uint64_t> ids{};
|
||||
|
||||
public:
|
||||
bool setup(benchmark::State &state) {
|
||||
return this->load_json(state, json_benchmark::TWITTER_JSON);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ using namespace simdjson;
|
|||
struct simdjson_dom {
|
||||
dom::parser parser{};
|
||||
|
||||
public:
|
||||
bool run(const simdjson::padded_string &json, std::vector<uint64_t> &ids) {
|
||||
// Walk the document, parsing as we go
|
||||
auto doc = parser.parse(json);
|
||||
|
|
|
@ -11,7 +11,7 @@ using namespace simdjson::builtin;
|
|||
|
||||
struct simdjson_ondemand {
|
||||
ondemand::parser parser{};
|
||||
public:
|
||||
|
||||
bool run(const simdjson::padded_string &json, std::vector<uint64_t> &ids) {
|
||||
// Walk the document, parsing as we go
|
||||
auto doc = parser.iterate(json);
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
namespace distinct_user_id {
|
||||
|
||||
struct yyjson {
|
||||
public:
|
||||
bool run(const simdjson::padded_string &json, std::vector<uint64_t> &ids) {
|
||||
// Walk the document, parsing the tweets as we go
|
||||
yyjson_doc *doc = yyjson_read(json.data(), json.size(), 0);
|
||||
|
|
|
@ -9,7 +9,6 @@ template<typename I>
|
|||
struct runner : public json_benchmark::file_runner<I> {
|
||||
std::string_view text;
|
||||
|
||||
public:
|
||||
bool setup(benchmark::State &state) {
|
||||
return this->load_json(state, json_benchmark::TWITTER_JSON);
|
||||
}
|
||||
|
|
|
@ -7,11 +7,9 @@ namespace json_benchmark {
|
|||
|
||||
template<typename I>
|
||||
struct const_json_runner : public runner_base<I> {
|
||||
protected:
|
||||
const simdjson::padded_string &json;
|
||||
const_json_runner(const simdjson::padded_string &_json) : json{_json} {}
|
||||
|
||||
public:
|
||||
/** Get the total number of bytes processed in each iteration. Used for metrics like bytes/second. */
|
||||
size_t bytes_per_iteration() {
|
||||
return json.size();
|
||||
|
|
|
@ -7,7 +7,6 @@ namespace json_benchmark {
|
|||
|
||||
template<typename I>
|
||||
struct file_runner : public runner_base<I> {
|
||||
protected:
|
||||
simdjson::padded_string json{};
|
||||
|
||||
bool load_json(benchmark::State &state, const char *file) {
|
||||
|
@ -21,7 +20,6 @@ protected:
|
|||
return true;
|
||||
}
|
||||
|
||||
public:
|
||||
/** Get the total number of bytes processed in each iteration. Used for metrics like bytes/second. */
|
||||
size_t bytes_per_iteration() {
|
||||
return json.size();
|
||||
|
|
|
@ -11,7 +11,6 @@ namespace json_benchmark {
|
|||
//
|
||||
template<typename I>
|
||||
struct runner_base {
|
||||
public:
|
||||
/** Run once, before all iterations. */
|
||||
simdjson_warn_unused bool setup(benchmark::State &) { return true; }
|
||||
|
||||
|
@ -35,7 +34,6 @@ public:
|
|||
/** Get the total number of items processed in each iteration. Used for metrics like items/second. */
|
||||
size_t items_per_iteration();
|
||||
|
||||
protected:
|
||||
I implementation{};
|
||||
};
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ template<typename I>
|
|||
struct runner : public json_benchmark::const_json_runner<I> {
|
||||
std::vector<point> points;
|
||||
|
||||
public:
|
||||
runner() : json_benchmark::const_json_runner<I>(get_built_json_array()) {}
|
||||
|
||||
bool before_run(benchmark::State &state) {
|
||||
|
|
|
@ -27,7 +27,6 @@ template<typename I>
|
|||
struct runner : public json_benchmark::const_json_runner<I> {
|
||||
std::vector<point> points;
|
||||
|
||||
public:
|
||||
runner() : json_benchmark::const_json_runner<I>(get_built_json_array()) {}
|
||||
|
||||
bool before_run(benchmark::State &state) {
|
||||
|
|
|
@ -11,7 +11,6 @@ template<typename I>
|
|||
struct runner : public json_benchmark::file_runner<I> {
|
||||
std::vector<tweet> tweets{};
|
||||
|
||||
public:
|
||||
bool setup(benchmark::State &state) {
|
||||
return this->load_json(state, json_benchmark::TWITTER_JSON);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue