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; |
+} |