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

Unified Diff: third_party/grpc/test/cpp/qps/sync_unary_ping_pong_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/sync_unary_ping_pong_test.cc
diff --git a/third_party/WebKit/Source/core/svg/SVGGraphicsElement.idl b/third_party/grpc/test/cpp/qps/sync_unary_ping_pong_test.cc
similarity index 58%
copy from third_party/WebKit/Source/core/svg/SVGGraphicsElement.idl
copy to third_party/grpc/test/cpp/qps/sync_unary_ping_pong_test.cc
index 77474efdc0bb3d698fa7a0e8b19258d3806f17af..9d363c04fb2d445b4c0a256834c2ee92bfa30f97 100644
--- a/third_party/WebKit/Source/core/svg/SVGGraphicsElement.idl
+++ b/third_party/grpc/test/cpp/qps/sync_unary_ping_pong_test.cc
@@ -1,5 +1,7 @@
/*
- * Copyright (C) 2013 Samsung Electronics. 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,19 +28,50 @@
* 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.
+ *
*/
-// http://www.w3.org/TR/SVG2/types.html#InterfaceSVGGraphicsElement
+#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 = 5;
+static const int BENCHMARK = 10;
+
+static void RunSynchronousUnaryPingPong() {
+ gpr_log(GPR_INFO, "Running Synchronous Unary Ping Pong");
+
+ ClientConfig client_config;
+ client_config.set_client_type(SYNC_CLIENT);
+ client_config.set_outstanding_rpcs_per_channel(1);
+ client_config.set_client_channels(1);
+ client_config.set_rpc_type(UNARY);
+ client_config.mutable_load_params()->mutable_closed_loop();
+
+ ServerConfig server_config;
+ server_config.set_server_type(SYNC_SERVER);
+
+ const auto result =
+ RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2);
+
+ GetReporter()->ReportQPS(*result);
+ GetReporter()->ReportLatency(*result);
+}
-interface SVGGraphicsElement : SVGElement {
- [Measure] readonly attribute SVGAnimatedTransformList transform;
+} // namespace testing
+} // namespace grpc
- [MeasureAs=SVGLocatableNearestViewportElement] readonly attribute SVGElement nearestViewportElement;
- [MeasureAs=SVGLocatableFarthestViewportElement] readonly attribute SVGElement farthestViewportElement;
+int main(int argc, char** argv) {
+ grpc::testing::InitBenchmark(&argc, &argv, true);
- [ImplementedAs=getBBoxFromJavascript] SVGRect getBBox();
- [ImplementedAs=getCTMFromJavascript] SVGMatrix getCTM();
- [ImplementedAs=getScreenCTMFromJavascript] SVGMatrix getScreenCTM();
-};
+ grpc::testing::RunSynchronousUnaryPingPong();
-SVGGraphicsElement implements SVGTests;
+ return 0;
+}
« no previous file with comments | « third_party/grpc/test/cpp/qps/sync_streaming_ping_pong_test.cc ('k') | third_party/grpc/test/cpp/qps/usage_timer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698