From 6a5496a3935a33069b1038f9ca47067b82189b77 Mon Sep 17 00:00:00 2001 From: Karchnu Date: Mon, 24 Aug 2020 19:58:43 +0200 Subject: [PATCH] Test with IPC::Connection -> IPC::Client. --- tests/performances/ipc_connection.cr | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/performances/ipc_connection.cr b/tests/performances/ipc_connection.cr index 0056a1e..68b0e65 100644 --- a/tests/performances/ipc_connection.cr +++ b/tests/performances/ipc_connection.cr @@ -5,19 +5,14 @@ require "../test-ws" ws_uri = "ws://localhost:1234/pong.JSON" message = IPC::Message.from_json(%({ "mtype" : 3, "utype" : 30, "payload" : "coucou" })) -pong = IPC::Connection.new "pong" Benchmark.ips do |bm| bm.report("connection") do - c = IPC::Connection.new "pong" + c = IPC::Client.new "pong" + c.close + end + + bm.report("connection through websocket") do + tws = TestWS.new ws_uri end end - -#puts "sleeping 5 seconds" -#sleep 5 -# -#Benchmark.ips do |bm| -# bm.report("connection through websocket") do -# tws = TestWS.new ws_uri -# end -#end