diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index a81155c242696af1618f11ce2f89164a9c880154..c6d3bb54d51fa52a0a5a8838785753f2f882b9f0 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -40,13 +40,13 @@ #include <grpc/support/log.h> +#include "src/proto/grpc/testing/payloads.grpc.pb.h" +#include "src/proto/grpc/testing/services.grpc.pb.h" +#include "test/cpp/qps/coresched.h" #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" -#include "test/cpp/qps/coresched.h" #include "test/cpp/qps/timer.h" #include "test/cpp/util/create_test_channel.h" -#include "src/proto/grpc/testing/payloads.grpc.pb.h" -#include "src/proto/grpc/testing/services.grpc.pb.h" namespace grpc { diff --git a/test/cpp/qps/coresched.cc b/test/cpp/qps/coresched.cc index 8a7b4d4e671af66469a5607df4cad50137f3985c..4b59227bd8f59105dcb16931f6581796e3ad09a5 100644 --- a/test/cpp/qps/coresched.cc +++ b/test/cpp/qps/coresched.cc @@ -33,10 +33,10 @@ #include "test/cpp/qps/coresched.h" -#include <vector> #include <grpc/support/cpu.h> #include <grpc/support/log.h> #include <grpc/support/port_platform.h> +#include <vector> namespace grpc { namespace testing { @@ -66,7 +66,7 @@ int LimitCores(std::vector<int> cores) { } #else // LimitCores is not currently supported for non-Linux platforms -int LimitCores(std::vector<int> core_vec) {return gpr_cpu_num_cores();} +int LimitCores(std::vector<int> core_vec) { return gpr_cpu_num_cores(); } #endif } // namespace testing } // namespace grpc diff --git a/test/cpp/qps/coresched.h b/test/cpp/qps/coresched.h index 38f68596368f59f660e593ade7ef8b1d9af6edb7..ec32a1d7fcf2eef50686f6a2b86143f09c21608d 100644 --- a/test/cpp/qps/coresched.h +++ b/test/cpp/qps/coresched.h @@ -42,4 +42,4 @@ int LimitCores(std::vector<int> core_vec); } // namespace testing } // namespace grpc -#endif // TEST_QPS_CORESCHED_H +#endif // TEST_QPS_CORESCHED_H diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index 6eafabcc2c1e2606699a087c65cdf8e9f17ffeae..691ad0b8164d51b49fe9cb1d94ab8a94e7bda152 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -96,7 +96,7 @@ static std::vector<int> IntParse(const std::string& s) { res.push_back(std::stoi(s.substr(pos))); break; } else { - res.push_back(std::stoi(s.substr(pos, comma-pos), nullptr)); + res.push_back(std::stoi(s.substr(pos, comma - pos), nullptr)); pos = comma + 1; } } @@ -161,7 +161,7 @@ static void QpsDriver() { if (FLAGS_client_core_list.size() > 0) { auto v = IntParse(FLAGS_client_core_list); - for (size_t i=0; i<v.size(); i++) { + for (size_t i = 0; i < v.size(); i++) { client_config.add_core_list(v[i]); } } @@ -173,7 +173,7 @@ static void QpsDriver() { if (FLAGS_server_core_list.size() > 0) { auto v = IntParse(FLAGS_server_core_list); - for (size_t i=0; i<v.size(); i++) { + for (size_t i = 0; i < v.size(); i++) { server_config.add_core_list(v[i]); } } diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index 34c09e5b9a940348aae3f6eb50c7c288f950b508..f7864224c11c06ac31d5df2908732c0ff5e479cf 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -36,26 +36,26 @@ #include <cassert> #include <memory> #include <mutex> +#include <sstream> #include <string> #include <thread> #include <vector> -#include <sstream> +#include <grpc++/client_context.h> +#include <grpc++/security/server_credentials.h> +#include <grpc++/server.h> +#include <grpc++/server_builder.h> #include <grpc/grpc.h> #include <grpc/support/alloc.h> #include <grpc/support/histogram.h> -#include <grpc/support/log.h> #include <grpc/support/host_port.h> -#include <grpc++/client_context.h> -#include <grpc++/server.h> -#include <grpc++/server_builder.h> -#include <grpc++/security/server_credentials.h> +#include <grpc/support/log.h> +#include "src/proto/grpc/testing/services.pb.h" #include "test/core/util/grpc_profiler.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/server.h" #include "test/cpp/util/create_test_channel.h" -#include "src/proto/grpc/testing/services.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 474473a7d068fe91f03fa4c2e758f03243c80ca4..3d2ffa8710fdc9100c01c5dae8f8b1f5f7a95981 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -34,16 +34,16 @@ #ifndef TEST_QPS_SERVER_H #define TEST_QPS_SERVER_H -#include <vector> -#include <grpc/support/cpu.h> #include <grpc++/security/server_credentials.h> +#include <grpc/support/cpu.h> +#include <vector> +#include "src/proto/grpc/testing/control.grpc.pb.h" +#include "src/proto/grpc/testing/messages.grpc.pb.h" #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/util/port.h" #include "test/cpp/qps/coresched.h" #include "test/cpp/qps/timer.h" -#include "src/proto/grpc/testing/messages.grpc.pb.h" -#include "src/proto/grpc/testing/control.grpc.pb.h" namespace grpc { namespace testing { @@ -99,7 +99,7 @@ class Server { } int port() const { return port_; } - int cores() const { return cores_;} + int cores() const { return cores_; } static std::shared_ptr<ServerCredentials> CreateServerCredentials( const ServerConfig& config) { if (config.has_security_params()) {