diff --git a/benchmark/distinct_user_id/distinct_user_id.h b/benchmark/distinct_user_id/distinct_user_id.h index 6cda36cc5..41ec09feb 100644 --- a/benchmark/distinct_user_id/distinct_user_id.h +++ b/benchmark/distinct_user_id/distinct_user_id.h @@ -10,7 +10,6 @@ template struct runner : public json_benchmark::file_runner { std::vector ids{}; -public: bool setup(benchmark::State &state) { return this->load_json(state, json_benchmark::TWITTER_JSON); } diff --git a/benchmark/distinct_user_id/simdjson_dom.h b/benchmark/distinct_user_id/simdjson_dom.h index 64b8e91ab..636374c89 100644 --- a/benchmark/distinct_user_id/simdjson_dom.h +++ b/benchmark/distinct_user_id/simdjson_dom.h @@ -11,7 +11,6 @@ using namespace simdjson; struct simdjson_dom { dom::parser parser{}; -public: bool run(const simdjson::padded_string &json, std::vector &ids) { // Walk the document, parsing as we go auto doc = parser.parse(json); diff --git a/benchmark/distinct_user_id/simdjson_ondemand.h b/benchmark/distinct_user_id/simdjson_ondemand.h index 4495750bf..d20343132 100644 --- a/benchmark/distinct_user_id/simdjson_ondemand.h +++ b/benchmark/distinct_user_id/simdjson_ondemand.h @@ -11,7 +11,7 @@ using namespace simdjson::builtin; struct simdjson_ondemand { ondemand::parser parser{}; -public: + bool run(const simdjson::padded_string &json, std::vector &ids) { // Walk the document, parsing as we go auto doc = parser.iterate(json); diff --git a/benchmark/distinct_user_id/yyjson.h b/benchmark/distinct_user_id/yyjson.h index 0a8e0e442..c4df2722d 100644 --- a/benchmark/distinct_user_id/yyjson.h +++ b/benchmark/distinct_user_id/yyjson.h @@ -7,7 +7,6 @@ namespace distinct_user_id { struct yyjson { -public: bool run(const simdjson::padded_string &json, std::vector &ids) { // Walk the document, parsing the tweets as we go yyjson_doc *doc = yyjson_read(json.data(), json.size(), 0); diff --git a/benchmark/find_tweet/find_tweet.h b/benchmark/find_tweet/find_tweet.h index d380c89bc..fd7c0f487 100644 --- a/benchmark/find_tweet/find_tweet.h +++ b/benchmark/find_tweet/find_tweet.h @@ -9,7 +9,6 @@ template struct runner : public json_benchmark::file_runner { std::string_view text; -public: bool setup(benchmark::State &state) { return this->load_json(state, json_benchmark::TWITTER_JSON); } diff --git a/benchmark/json_benchmark/const_json_runner.h b/benchmark/json_benchmark/const_json_runner.h index d543696aa..c935fb5ea 100644 --- a/benchmark/json_benchmark/const_json_runner.h +++ b/benchmark/json_benchmark/const_json_runner.h @@ -7,11 +7,9 @@ namespace json_benchmark { template struct const_json_runner : public runner_base { -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(); diff --git a/benchmark/json_benchmark/file_runner.h b/benchmark/json_benchmark/file_runner.h index 238264368..135856354 100644 --- a/benchmark/json_benchmark/file_runner.h +++ b/benchmark/json_benchmark/file_runner.h @@ -7,7 +7,6 @@ namespace json_benchmark { template struct file_runner : public runner_base { -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(); diff --git a/benchmark/json_benchmark/runner_base.h b/benchmark/json_benchmark/runner_base.h index 018832a73..a3758b4b5 100644 --- a/benchmark/json_benchmark/runner_base.h +++ b/benchmark/json_benchmark/runner_base.h @@ -11,7 +11,6 @@ namespace json_benchmark { // template 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{}; }; diff --git a/benchmark/kostya/kostya.h b/benchmark/kostya/kostya.h index a47d9b011..b7245303d 100644 --- a/benchmark/kostya/kostya.h +++ b/benchmark/kostya/kostya.h @@ -30,7 +30,6 @@ template struct runner : public json_benchmark::const_json_runner { std::vector points; -public: runner() : json_benchmark::const_json_runner(get_built_json_array()) {} bool before_run(benchmark::State &state) { diff --git a/benchmark/large_random/large_random.h b/benchmark/large_random/large_random.h index 1ec3c6fa8..224514248 100644 --- a/benchmark/large_random/large_random.h +++ b/benchmark/large_random/large_random.h @@ -27,7 +27,6 @@ template struct runner : public json_benchmark::const_json_runner { std::vector points; -public: runner() : json_benchmark::const_json_runner(get_built_json_array()) {} bool before_run(benchmark::State &state) { diff --git a/benchmark/partial_tweets/partial_tweets.h b/benchmark/partial_tweets/partial_tweets.h index 9688ea39c..c6fc720a8 100644 --- a/benchmark/partial_tweets/partial_tweets.h +++ b/benchmark/partial_tweets/partial_tweets.h @@ -11,7 +11,6 @@ template struct runner : public json_benchmark::file_runner { std::vector tweets{}; -public: bool setup(benchmark::State &state) { return this->load_json(state, json_benchmark::TWITTER_JSON); }