-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.rb
executable file
·40 lines (29 loc) · 874 Bytes
/
test.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
require 'pool_sim'
require 'prop'
require 'esmpps'
require 'smpps'
require 'xpps'
require 'pplns'
require 'estimator'
require 'pps_attack'
attack_opts = {:hopper_percent => 3, :ppshopper_percent => 2, :withholding_percent => 1}
esmpps = ESMPPS.new attack_opts
#esmpps.extend PPSAttack
smpps = SMPPS.new attack_opts
#smpps.extend PPSAttack
xpps = XPPS.new attack_opts
#xpps.extend PPSAttack
pplns = PPLNS.new attack_opts
#pplns.extend PPSAttack
prop = Prop.new attack_opts
#prop.extend PPSAttack
puts "\n=== ESMPPS ===\n\n"
Estimator.new(esmpps, :runs => 100).run.analyze
puts "\n=== SMPPS ===\n\n"
Estimator.new(smpps, :runs => 100).run.analyze
puts "\n=== xPPS ===\n\n"
Estimator.new(xpps, :runs => 100).run.analyze
puts "\n=== PPLNS ===\n\n"
Estimator.new(pplns, :runs => 100).run.analyze
puts "\n=== Prop ===\n\n"
Estimator.new(prop, :runs => 100).run.analyze