19 lines
283 B
Crystal
19 lines
283 B
Crystal
require "benchmark"
|
|
require "ipc"
|
|
|
|
message = IPC::Message.from_json(%({ "mtype" : 3, "utype" : 30, "payload" : "coucou" }))
|
|
|
|
Benchmark.ips do |bm|
|
|
bm.report("puts") do
|
|
puts "coucou"
|
|
end
|
|
|
|
bm.report("puts vide") do
|
|
puts
|
|
end
|
|
|
|
bm.report("pp! message") do
|
|
pp! message
|
|
end
|
|
end
|