zold-stress 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 248bf6c82672660722eb74f2b0696c4926eeeb50d61b25377ed5c3ac806ceeb5
4
- data.tar.gz: aef24db1ecb27a4ab06abd78cb0b0c06640a3df4057f489ebf681afa85d12538
3
+ metadata.gz: 5b23c6e86e7590c431311fd2a6651a7591a483a7ca800e77ff0be2ec8d7dbb8a
4
+ data.tar.gz: 2308e303506b47b78e882a6f16da053fa572dbbbd89c81819fb8c16ab9be326f
5
5
  SHA512:
6
- metadata.gz: a614846d58b82b6eacece6b07a3ab569946b5eaaf0afcafd9b253f50cebfdd4815d81f5dc46b461e791c8458867603c835af6364ae020e8793a0665dbcc89929
7
- data.tar.gz: f453230f378e10b9dc6f174a450d66b70d387c76d0f28b69492d276c1c7e56a33be532276b499a8de7fbe1127e72708064f4436b44937a800c5aa21b5de81e98
6
+ metadata.gz: 0b018063e2472106aae1dae430aeff0afd9badc7f678e44a7d46543874dc263eca376ae33deb1e2194b7feea82f690ba83928026e5f504f686983c162f3c5b15
7
+ data.tar.gz: 3c0ddf95a66d028db510bd5e2867b307c886dbe8c33b01c64ce40d02e1e2ed83c8f07fec2e2bf848be61c950376399b08dbf95d083f5c2fea2c4093397086ae0
@@ -77,6 +77,7 @@ Available options:"
77
77
  "The name of the network we work in (default: #{Zold::Wallet::MAINET}",
78
78
  required: true,
79
79
  default: Zold::Wallet::MAINET
80
+ o.bool '--skip-update', 'Don\'t update the list of remote nodes'
80
81
  o.bool '-h', '--help', 'Show these instructions'
81
82
  o.on '--verbose', 'Enable extra logging information' do
82
83
  log = Zold::Log::VERBOSE
@@ -127,9 +128,10 @@ Available options:"
127
128
  log.info("Rounds: #{opts['rounds']}, threads: #{opts['threads']}, pool: #{opts['pool']}, batch: #{opts['batch']}")
128
129
 
129
130
  start = Time.now
130
- round.update
131
+ round.update unless opts['skip-update']
131
132
  round.prepare
132
133
  opts['rounds'].times do |r|
134
+ round.update unless opts['skip-update']
133
135
  round.send
134
136
  round.pull
135
137
  round.match
@@ -1,5 +1,9 @@
1
1
  #!/bin/bash
2
2
 
3
+ # rm -rf /code/temp/stress/*
4
+ # cp id_rsa* /code/temp/stress
5
+ # cd /code/temp/stress
6
+
3
7
  function start_node {
4
8
  port=$1
5
9
  mkdir ${port}
@@ -29,7 +33,7 @@ for port in ${nodes[@]}; do
29
33
  cd ${port}
30
34
  for friend in ${nodes[@]}; do
31
35
  if [ "${port}" != "${friend}" ]; then
32
- zold remote add localhost ${friend}
36
+ zold remote add localhost ${friend} --skip-ping
33
37
  fi
34
38
  done
35
39
  cd ..
@@ -39,7 +43,7 @@ wait
39
43
 
40
44
  zold remote clean
41
45
  for port in ${nodes[@]}; do
42
- zold remote add localhost ${port} &
46
+ zold remote add localhost ${port} --skip-ping &
43
47
  done
44
48
  wait
45
49
 
@@ -49,5 +53,7 @@ zold pay --private-key=id_rsa 0000000000000000 abcdabcdabcdabcd 4.95 'To test'
49
53
  zold push 0000000000000000 --ignore-score-weakness
50
54
  zold remove 0000000000000000
51
55
 
52
- # zold-stress --rounds=32 --wait=10 --threads=8 --pool=8 --batch=16 --private-key=id_rsa --ignore-score-weakness
53
- zold-stress --rounds=4 --wait=10 --threads=${#nodes[@]} --pool=8 --batch=8 --private-key=id_rsa --ignore-score-weakness
56
+ # sleep 10000
57
+
58
+ zold-stress --rounds=4 --wait=10 --threads=${#nodes[@]} --pool=8 --batch=8 \
59
+ --private-key=id_rsa --ignore-score-weakness --skip-update
@@ -26,5 +26,5 @@ zold pay --private-key=id_rsa 0000000000000000 abcdabcdabcdabcd 4.95 'To test'
26
26
  zold push 0000000000000000
27
27
  zold remove 0000000000000000
28
28
 
29
- # zold-stress --rounds=8 --wait=5 --threads=32 --pool=32 --batch=64 --private-key=id_rsa --verbose
30
- zold-stress --rounds=4 --wait=5 --threads=4 --pool=4 --batch=4 --private-key=id_rsa
29
+ zold-stress --rounds=4 --wait=5 --threads=4 --pool=4 --batch=4 \
30
+ --private-key=id_rsa --ignore-score-weakness --skip-update
@@ -76,7 +76,7 @@ module Zold::Stress
76
76
  Zold::Taxes.new(wallets: @wallets, remotes: @remotes, log: @vlog).run(
77
77
  [
78
78
  'taxes', 'pay', source.to_s, "--network=#{@opts['network']}",
79
- "--private-key=#{pvt}", '--ignore-nodes-absence'
79
+ "--private-key=#{pvt}", '--ignore-nodes-absence', '--skip-propagate'
80
80
  ]
81
81
  )
82
82
  if @wallets.acq(source) { |w| Zold::Tax.new(w).in_debt? }
@@ -68,8 +68,8 @@ module Zold::Stress
68
68
  end
69
69
  end
70
70
  return if balances.find { |b| b[:balance].positive? }
71
- raise "There is not a single wallet among #{balances.count} with a positive balance, in #{@wallets.path}: \
72
- #{balances.map { |b| "#{b[:id]}: #{b[:balance]}" }.join("\n")}"
71
+ raise "There is not a single wallet among #{balances.count} with a positive balance, in #{@wallets.path}:\n\
72
+ #{balances.map { |b| "#{b[:id]}: #{b[:balance]}" }.join("\n")}"
73
73
  end
74
74
  end
75
75
  end
@@ -57,6 +57,7 @@ class TestBin < Minitest::Test
57
57
  end
58
58
  end
59
59
  end
60
+ sleep 1
60
61
  test_log.info("\n\n#{f} done in #{Zold::Age.new(start)}")
61
62
  end
62
63
  end
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
27
27
  s.rubygems_version = '2.2'
28
28
  s.required_ruby_version = '>=2.3'
29
29
  s.name = 'zold-stress'
30
- s.version = '0.5.3'
30
+ s.version = '0.6.0'
31
31
  s.license = 'MIT'
32
32
  s.summary = 'Zold stress test'
33
33
  s.description = 'Stress testing toolkit for Zold network'
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
43
43
  s.add_runtime_dependency 'concurrent-ruby', '1.1.3'
44
44
  s.add_runtime_dependency 'parallelize', '0.4.1'
45
45
  s.add_runtime_dependency 'slop', '4.6.2'
46
- s.add_runtime_dependency 'zold', '0.16.29'
46
+ s.add_runtime_dependency 'zold', '0.16.30'
47
47
  s.add_development_dependency 'codecov', '0.1.13'
48
48
  s.add_development_dependency 'minitest', '5.11.3'
49
49
  s.add_development_dependency 'random-port', '0.3.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zold-stress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 0.16.29
75
+ version: 0.16.30
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 0.16.29
82
+ version: 0.16.30
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: codecov
85
85
  requirement: !ruby/object:Gem::Requirement