Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: third_party/grpc/test/cpp/qps/qps_test.cc

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/grpc/test/cpp/qps/qps_test.cc
diff --git a/third_party/WebKit/Source/core/html/HTMLKeygenElement.idl b/third_party/grpc/test/cpp/qps/qps_test.cc
similarity index 57%
copy from third_party/WebKit/Source/core/html/HTMLKeygenElement.idl
copy to third_party/grpc/test/cpp/qps/qps_test.cc
index 011687d798683228e2a055cc7b3850f963bd6899..27aaf137f64904243543442b9aad031df42a5bc1 100644
--- a/third_party/WebKit/Source/core/html/HTMLKeygenElement.idl
+++ b/third_party/grpc/test/cpp/qps/qps_test.cc
@@ -1,5 +1,7 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Copyright 2015-2016, Google Inc.
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -26,26 +28,52 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
*/
-// https://html.spec.whatwg.org/#the-keygen-element
+#include <set>
+
+#include <grpc/support/log.h>
+
+#include "test/cpp/qps/driver.h"
+#include "test/cpp/qps/report.h"
+#include "test/cpp/util/benchmark_config.h"
+
+namespace grpc {
+namespace testing {
+
+static const int WARMUP = 20;
+static const int BENCHMARK = 40;
+
+static void RunQPS() {
+ gpr_log(GPR_INFO, "Running QPS test");
+
+ ClientConfig client_config;
+ client_config.set_client_type(ASYNC_CLIENT);
+ client_config.set_outstanding_rpcs_per_channel(1000);
+ client_config.set_client_channels(8);
+ client_config.set_async_client_threads(8);
+ client_config.set_rpc_type(STREAMING);
+ client_config.mutable_load_params()->mutable_closed_loop();
+
+ ServerConfig server_config;
+ server_config.set_server_type(ASYNC_SERVER);
+ server_config.set_async_server_threads(8);
+
+ const auto result =
+ RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2);
+
+ GetReporter()->ReportQPSPerCore(*result);
+ GetReporter()->ReportLatency(*result);
+}
-interface HTMLKeygenElement : HTMLElement {
- [Reflect] attribute boolean autofocus;
- [Reflect] attribute DOMString challenge;
- [Reflect] attribute boolean disabled;
- [ImplementedAs=formOwner] readonly attribute HTMLFormElement? form;
- [Reflect, ReflectOnly="rsa", ReflectMissing="rsa"] attribute DOMString keytype;
- [Reflect] attribute DOMString name;
+} // namespace testing
+} // namespace grpc
- readonly attribute DOMString type;
+int main(int argc, char** argv) {
+ grpc::testing::InitBenchmark(&argc, &argv, true);
- readonly attribute boolean willValidate;
- readonly attribute ValidityState validity;
- readonly attribute DOMString validationMessage;
- boolean checkValidity();
- boolean reportValidity();
- void setCustomValidity(DOMString error);
+ grpc::testing::RunQPS();
- readonly attribute NodeList labels;
-};
+ return 0;
+}
« no previous file with comments | « third_party/grpc/test/cpp/qps/qps_openloop_test.cc ('k') | third_party/grpc/test/cpp/qps/qps_test_with_poll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698