Obsolete
/
ipcd
Archived
3
0
Fork 0

Test with IPC::Connection -> IPC::Client.

master
Karchnu 2020-08-24 19:58:43 +02:00
parent be32df0d46
commit 6a5496a393
1 changed files with 6 additions and 11 deletions

View File

@ -5,19 +5,14 @@ require "../test-ws"
ws_uri = "ws://localhost:1234/pong.JSON" ws_uri = "ws://localhost:1234/pong.JSON"
message = IPC::Message.from_json(%({ "mtype" : 3, "utype" : 30, "payload" : "coucou" })) message = IPC::Message.from_json(%({ "mtype" : 3, "utype" : 30, "payload" : "coucou" }))
pong = IPC::Connection.new "pong"
Benchmark.ips do |bm| Benchmark.ips do |bm|
bm.report("connection") do bm.report("connection") do
c = IPC::Connection.new "pong" c = IPC::Client.new "pong"
end c.close
end end
#puts "sleeping 5 seconds" bm.report("connection through websocket") do
#sleep 5 tws = TestWS.new ws_uri
# end
#Benchmark.ips do |bm| end
# bm.report("connection through websocket") do
# tws = TestWS.new ws_uri
# end
#end