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

Unified Diff: third_party/grpc/test/cpp/qps/sync_streaming_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
« no previous file with comments | « third_party/grpc/test/cpp/qps/stats.h ('k') | third_party/grpc/test/cpp/qps/sync_unary_ping_pong_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/grpc/test/cpp/qps/sync_streaming_ping_pong_test.cc
diff --git a/third_party/WebKit/Source/core/layout/LayoutSliderThumb.h b/third_party/grpc/test/cpp/qps/sync_streaming_ping_pong_test.cc
similarity index 58%
copy from third_party/WebKit/Source/core/layout/LayoutSliderThumb.h
copy to third_party/grpc/test/cpp/qps/sync_streaming_ping_pong_test.cc
index fff65ccb18c1fb211b685c2152a1fba046c4b7a7..e02c14c926d36e27324440dbce92e0873f4c010d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutSliderThumb.h
+++ b/third_party/grpc/test/cpp/qps/sync_streaming_ping_pong_test.cc
@@ -1,6 +1,7 @@
/*
- * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
- * Copyright (C) 2010 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
@@ -27,29 +28,49 @@
* 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.
+ *
*/
-#ifndef LayoutSliderThumb_h
-#define LayoutSliderThumb_h
+#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;
-#include "core/html/shadow/SliderThumbElement.h"
-#include "core/layout/LayoutBlockFlow.h"
+static void RunSynchronousStreamingPingPong() {
+ gpr_log(GPR_INFO, "Running Synchronous Streaming Ping Pong");
-namespace blink {
+ 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(STREAMING);
+ client_config.mutable_load_params()->mutable_closed_loop();
-class SliderThumbElement;
+ ServerConfig server_config;
+ server_config.set_server_type(SYNC_SERVER);
-class LayoutSliderThumb final : public LayoutBlockFlow {
-public:
- LayoutSliderThumb(SliderThumbElement*);
- void updateAppearance(const ComputedStyle& parentStyle);
+ const auto result =
+ RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2);
-private:
- bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSliderThumb || LayoutBlockFlow::isOfType(type); }
-};
+ GetReporter()->ReportQPS(*result);
+ GetReporter()->ReportLatency(*result);
+}
+} // namespace testing
+} // namespace grpc
-DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSliderThumb, isSliderThumb());
+int main(int argc, char** argv) {
+ grpc::testing::InitBenchmark(&argc, &argv, true);
-} // namespace blink
+ grpc::testing::RunSynchronousStreamingPingPong();
-#endif // LayoutSliderThumb_h
+ return 0;
+}
« no previous file with comments | « third_party/grpc/test/cpp/qps/stats.h ('k') | third_party/grpc/test/cpp/qps/sync_unary_ping_pong_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698