-
-
Save kares/3576e272250204eb66d1 to your computer and use it in GitHub Desktop.
AHN::Call.new singleton method def at runtime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# proxy.method_missing : | |
You tried to initialize with an invalid environment name . Valid values are [:production, :development, :staging, :test]. | |
user system total real | |
Adhearsion::Call 12.120000 0.620000 12.740000 ( 7.808000) | |
You tried to initialize with an invalid environment name . Valid values are [:production, :development, :staging, :test]. | |
user system total real | |
Adhearsion::Call 12.160000 0.630000 12.790000 ( 8.021000) | |
You tried to initialize with an invalid environment name . Valid values are [:production, :development, :staging, :test]. | |
user system total real | |
Adhearsion::Call 12.380000 0.650000 13.030000 ( 8.303000) | |
# proxy_class Call::ActorProxy | |
You tried to initialize with an invalid environment name . Valid values are [:production, :development, :staging, :test]. | |
user system total real | |
Adhearsion::Call 8.240000 0.560000 8.800000 ( 5.080000) | |
You tried to initialize with an invalid environment name . Valid values are [:production, :development, :staging, :test]. | |
user system total real | |
Adhearsion::Call 8.250000 0.580000 8.830000 ( 5.192000) | |
You tried to initialize with an invalid environment name . Valid values are [:production, :development, :staging, :test]. | |
user system total real | |
Adhearsion::Call 8.220000 0.450000 8.670000 ( 4.976000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
call_id = rand.to_s | |
domain = 'rayo.net' | |
headers = nil | |
to = 'sip:you@there.com' | |
from = 'sip:me@here.com' | |
transport = 'footransport' | |
offer = Punchblock::Event::Offer.new target_call_id: call_id, | |
domain: domain, | |
transport: transport, | |
to: to, | |
from: from, | |
headers: headers | |
Benchmark.bm do |x| | |
x.report 'Adhearsion::Call' do | |
1000.times do | |
Adhearsion::Call.new(offer) | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# proxy.method_missing : | |
You tried to initialize with an invalid environment name . Valid values are [:production, :development, :staging, :test]. | |
Rehearsal ---------------------------------------------------- | |
Adhearsion::Call 8.700000 0.450000 9.150000 ( 5.540000) | |
------------------------------------------- total: 9.150000sec | |
user system total real | |
Adhearsion::Call 6.070000 0.510000 6.580000 ( 4.563000) | |
You tried to initialize with an invalid environment name . Valid values are [:production, :development, :staging, :test]. | |
Rehearsal ---------------------------------------------------- | |
Adhearsion::Call 8.690000 0.410000 9.100000 ( 5.493000) | |
------------------------------------------- total: 9.100000sec | |
user system total real | |
Adhearsion::Call 6.250000 0.420000 6.670000 ( 4.756000) | |
You tried to initialize with an invalid environment name . Valid values are [:production, :development, :staging, :test]. | |
Rehearsal ---------------------------------------------------- | |
Adhearsion::Call 9.030000 0.430000 9.460000 ( 5.376000) | |
------------------------------------------- total: 9.460000sec | |
user system total real | |
Adhearsion::Call 6.060000 0.410000 6.470000 ( 4.520000) | |
# proxy_class Call::ActorProxy | |
You tried to initialize with an invalid environment name . Valid values are [:production, :development, :staging, :test]. | |
Rehearsal ---------------------------------------------------- | |
Adhearsion::Call 6.580000 0.340000 6.920000 ( 3.995000) | |
------------------------------------------- total: 6.920000sec | |
user system total real | |
Adhearsion::Call 3.970000 0.280000 4.250000 ( 2.849000) | |
You tried to initialize with an invalid environment name . Valid values are [:production, :development, :staging, :test]. | |
Rehearsal ---------------------------------------------------- | |
Adhearsion::Call 7.190000 0.350000 7.540000 ( 4.208000) | |
------------------------------------------- total: 7.540000sec | |
user system total real | |
Adhearsion::Call 4.260000 0.790000 5.050000 ( 3.727000) | |
You tried to initialize with an invalid environment name . Valid values are [:production, :development, :staging, :test]. | |
Rehearsal ---------------------------------------------------- | |
Adhearsion::Call 7.020000 0.340000 7.360000 ( 4.005000) | |
------------------------------------------- total: 7.360000sec | |
user system total real | |
Adhearsion::Call 3.830000 0.270000 4.100000 ( 2.742000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark.bmbm do |x| | |
x.report 'Adhearsion::Call' do | |
500.times do | |
call = Adhearsion::Call.new(offer) | |
call.uri; call.variables; call.to_s | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment