mu 5.7.8 → 5.7.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. data/lib/mu.rb +1 -1
  2. data/lib/mu/command.rb +18 -2
  3. data/lib/mu/command/cmd_musl.rb +165 -0
  4. data/lib/mu/command/cmd_runscale.rb +12 -8
  5. data/lib/mu/command/help.rb +1 -0
  6. data/lib/mu/har.rb +449 -0
  7. data/lib/mu/libxml.rb +21 -0
  8. data/lib/mu/maker.rb +288 -0
  9. data/lib/mu/xmlizable.rb +559 -0
  10. metadata +78 -267
  11. data/rdoc/Gemfile.html +0 -194
  12. data/rdoc/LICENSE_txt.html +0 -201
  13. data/rdoc/Mu.html +0 -478
  14. data/rdoc/Mu/Client.html +0 -461
  15. data/rdoc/Mu/Command.html +0 -338
  16. data/rdoc/Mu/Command/API.html +0 -844
  17. data/rdoc/Mu/Command/Cmd_appid.html +0 -1341
  18. data/rdoc/Mu/Command/Cmd_cli.html +0 -800
  19. data/rdoc/Mu/Command/Cmd_ddt.html +0 -1612
  20. data/rdoc/Mu/Command/Cmd_homepage.html +0 -762
  21. data/rdoc/Mu/Command/Cmd_muapi.html +0 -1363
  22. data/rdoc/Mu/Command/Cmd_netconfig.html +0 -1077
  23. data/rdoc/Mu/Command/Cmd_runscale.html +0 -1441
  24. data/rdoc/Mu/Command/Cmd_runscenario.html +0 -787
  25. data/rdoc/Mu/Command/Cmd_runverify.html +0 -893
  26. data/rdoc/Mu/Command/Cmd_scale.html +0 -1323
  27. data/rdoc/Mu/Command/Cmd_system.html +0 -677
  28. data/rdoc/Mu/Command/Curl.html +0 -751
  29. data/rdoc/Mu/Command/Help.html +0 -305
  30. data/rdoc/Mu/Curl.html +0 -243
  31. data/rdoc/Mu/Curl/Error.html +0 -304
  32. data/rdoc/Mu/Curl/Error/Authorize.html +0 -355
  33. data/rdoc/Mu/Curl/Error/Connect.html +0 -286
  34. data/rdoc/Mu/Curl/Error/DNS.html +0 -236
  35. data/rdoc/Mu/Curl/Error/Region.html +0 -307
  36. data/rdoc/Mu/Curl/Error/Status.html +0 -286
  37. data/rdoc/Mu/Curl/Error/Timeout.html +0 -286
  38. data/rdoc/Mu/Curl/Verify.html +0 -472
  39. data/rdoc/Mu/Curl/Verify/Request.html +0 -424
  40. data/rdoc/Mu/Curl/Verify/Response.html +0 -372
  41. data/rdoc/Mu/Curl/Verify/Result.html +0 -373
  42. data/rdoc/Mu/Ddt.html +0 -1347
  43. data/rdoc/Mu/Helper.html +0 -517
  44. data/rdoc/Mu/Homepage.html +0 -719
  45. data/rdoc/Mu/HttpHelper.html +0 -890
  46. data/rdoc/Mu/Muapi.html +0 -1226
  47. data/rdoc/Mu/Netconfig.html +0 -1178
  48. data/rdoc/Mu/Scale.html +0 -1359
  49. data/rdoc/Mu/System.html +0 -504
  50. data/rdoc/Object.html +0 -285
  51. data/rdoc/README_rdoc.html +0 -892
  52. data/rdoc/Rakefile.html +0 -257
  53. data/rdoc/TCTestMu.html +0 -2583
  54. data/rdoc/Test.html +0 -235
  55. data/rdoc/Test/Unit.html +0 -235
  56. data/rdoc/Test/Unit/TestCase.html +0 -236
  57. data/rdoc/Test/helper_rb.html +0 -62
  58. data/rdoc/Test/tc_test_mu_rb.html +0 -60
  59. data/rdoc/VERSION.html +0 -179
  60. data/rdoc/bin/mu.html +0 -54
  61. data/rdoc/classes/Mu.html +0 -132
  62. data/rdoc/classes/Mu/Client.html +0 -214
  63. data/rdoc/classes/Mu/Command.html +0 -129
  64. data/rdoc/classes/Mu/Command/API.html +0 -362
  65. data/rdoc/classes/Mu/Command/Cmd_appid.html +0 -238
  66. data/rdoc/classes/Mu/Command/Cmd_cli.html +0 -273
  67. data/rdoc/classes/Mu/Command/Cmd_ddt.html +0 -639
  68. data/rdoc/classes/Mu/Command/Cmd_homepage.html +0 -276
  69. data/rdoc/classes/Mu/Command/Cmd_muapi.html +0 -527
  70. data/rdoc/classes/Mu/Command/Cmd_netconfig.html +0 -399
  71. data/rdoc/classes/Mu/Command/Cmd_runscale.html +0 -220
  72. data/rdoc/classes/Mu/Command/Cmd_runscenario.html +0 -197
  73. data/rdoc/classes/Mu/Command/Cmd_runverify.html +0 -196
  74. data/rdoc/classes/Mu/Command/Cmd_scale.html +0 -511
  75. data/rdoc/classes/Mu/Command/Cmd_system.html +0 -236
  76. data/rdoc/classes/Mu/Command/Curl.html +0 -182
  77. data/rdoc/classes/Mu/Command/Help.html +0 -137
  78. data/rdoc/classes/Mu/Curl.html +0 -116
  79. data/rdoc/classes/Mu/Curl/Error.html +0 -148
  80. data/rdoc/classes/Mu/Curl/Error/Authorize.html +0 -165
  81. data/rdoc/classes/Mu/Curl/Error/Connect.html +0 -139
  82. data/rdoc/classes/Mu/Curl/Error/DNS.html +0 -113
  83. data/rdoc/classes/Mu/Curl/Error/Region.html +0 -150
  84. data/rdoc/classes/Mu/Curl/Error/Status.html +0 -139
  85. data/rdoc/classes/Mu/Curl/Error/Timeout.html +0 -139
  86. data/rdoc/classes/Mu/Curl/Verify.html +0 -207
  87. data/rdoc/classes/Mu/Curl/Verify/Request.html +0 -187
  88. data/rdoc/classes/Mu/Curl/Verify/Response.html +0 -172
  89. data/rdoc/classes/Mu/Curl/Verify/Result.html +0 -172
  90. data/rdoc/classes/Mu/Ddt.html +0 -610
  91. data/rdoc/classes/Mu/Helper.html +0 -308
  92. data/rdoc/classes/Mu/Homepage.html +0 -306
  93. data/rdoc/classes/Mu/HttpHelper.html +0 -393
  94. data/rdoc/classes/Mu/Muapi.html +0 -549
  95. data/rdoc/classes/Mu/Netconfig.html +0 -478
  96. data/rdoc/classes/Mu/Scale.html +0 -580
  97. data/rdoc/classes/Mu/System.html +0 -232
  98. data/rdoc/classes/Object.html +0 -139
  99. data/rdoc/classes/TCTestMu.html +0 -948
  100. data/rdoc/classes/Test.html +0 -107
  101. data/rdoc/classes/Test/Unit.html +0 -107
  102. data/rdoc/classes/Test/Unit/TestCase.html +0 -113
  103. data/rdoc/created.rid +0 -36
  104. data/rdoc/files/lib/mu/api/ddt_rb.html +0 -101
  105. data/rdoc/files/lib/mu/api/homepage_rb.html +0 -101
  106. data/rdoc/files/lib/mu/api/muapi_rb.html +0 -101
  107. data/rdoc/files/lib/mu/api/netconfig_rb.html +0 -101
  108. data/rdoc/files/lib/mu/api/scale_rb.html +0 -101
  109. data/rdoc/files/lib/mu/api/system_rb.html +0 -101
  110. data/rdoc/files/lib/mu/client_rb.html +0 -101
  111. data/rdoc/files/lib/mu/command/api_rb.html +0 -101
  112. data/rdoc/files/lib/mu/command/cmd_appid_rb.html +0 -119
  113. data/rdoc/files/lib/mu/command/cmd_cli_rb.html +0 -108
  114. data/rdoc/files/lib/mu/command/cmd_ddt_rb.html +0 -116
  115. data/rdoc/files/lib/mu/command/cmd_homepage_rb.html +0 -115
  116. data/rdoc/files/lib/mu/command/cmd_muapi_rb.html +0 -115
  117. data/rdoc/files/lib/mu/command/cmd_netconfig_rb.html +0 -116
  118. data/rdoc/files/lib/mu/command/cmd_runscale_rb.html +0 -119
  119. data/rdoc/files/lib/mu/command/cmd_runscenario_rb.html +0 -115
  120. data/rdoc/files/lib/mu/command/cmd_runverify_rb.html +0 -118
  121. data/rdoc/files/lib/mu/command/cmd_scale_rb.html +0 -115
  122. data/rdoc/files/lib/mu/command/cmd_system_rb.html +0 -116
  123. data/rdoc/files/lib/mu/command/curl_rb.html +0 -101
  124. data/rdoc/files/lib/mu/command/help_rb.html +0 -101
  125. data/rdoc/files/lib/mu/command_rb.html +0 -107
  126. data/rdoc/files/lib/mu/curl/error_rb.html +0 -101
  127. data/rdoc/files/lib/mu/curl/verify_rb.html +0 -101
  128. data/rdoc/files/lib/mu/helper_rb.html +0 -101
  129. data/rdoc/files/lib/mu/http_helper_rb.html +0 -101
  130. data/rdoc/files/lib/mu_rb.html +0 -121
  131. data/rdoc/files/test/helper_rb.html +0 -112
  132. data/rdoc/files/test/tc_test_mu_rb.html +0 -111
  133. data/rdoc/fr_class_index.html +0 -34
  134. data/rdoc/fr_file_index.html +0 -31
  135. data/rdoc/fr_method_index.html +0 -112
  136. data/rdoc/images/brick.png +0 -0
  137. data/rdoc/images/brick_link.png +0 -0
  138. data/rdoc/images/bug.png +0 -0
  139. data/rdoc/images/bullet_black.png +0 -0
  140. data/rdoc/images/bullet_toggle_minus.png +0 -0
  141. data/rdoc/images/bullet_toggle_plus.png +0 -0
  142. data/rdoc/images/date.png +0 -0
  143. data/rdoc/images/find.png +0 -0
  144. data/rdoc/images/loadingAnimation.gif +0 -0
  145. data/rdoc/images/macFFBgHack.png +0 -0
  146. data/rdoc/images/package.png +0 -0
  147. data/rdoc/images/page_green.png +0 -0
  148. data/rdoc/images/page_white_text.png +0 -0
  149. data/rdoc/images/page_white_width.png +0 -0
  150. data/rdoc/images/plugin.png +0 -0
  151. data/rdoc/images/ruby.png +0 -0
  152. data/rdoc/images/tag_green.png +0 -0
  153. data/rdoc/images/wrench.png +0 -0
  154. data/rdoc/images/wrench_orange.png +0 -0
  155. data/rdoc/images/zoom.png +0 -0
  156. data/rdoc/index.html +0 -884
  157. data/rdoc/js/darkfish.js +0 -116
  158. data/rdoc/js/jquery.js +0 -32
  159. data/rdoc/js/quicksearch.js +0 -114
  160. data/rdoc/js/thickbox-compressed.js +0 -10
  161. data/rdoc/lib/mu/api/ddt_rb.html +0 -52
  162. data/rdoc/lib/mu/api/homepage_rb.html +0 -52
  163. data/rdoc/lib/mu/api/muapi_rb.html +0 -52
  164. data/rdoc/lib/mu/api/netconfig_rb.html +0 -52
  165. data/rdoc/lib/mu/api/scale_rb.html +0 -52
  166. data/rdoc/lib/mu/api/system_rb.html +0 -52
  167. data/rdoc/lib/mu/client_rb.html +0 -52
  168. data/rdoc/lib/mu/command/api_rb.html +0 -52
  169. data/rdoc/lib/mu/command/cmd_appid_rb.html +0 -62
  170. data/rdoc/lib/mu/command/cmd_cli_rb.html +0 -55
  171. data/rdoc/lib/mu/command/cmd_ddt_rb.html +0 -60
  172. data/rdoc/lib/mu/command/cmd_homepage_rb.html +0 -57
  173. data/rdoc/lib/mu/command/cmd_muapi_rb.html +0 -59
  174. data/rdoc/lib/mu/command/cmd_netconfig_rb.html +0 -58
  175. data/rdoc/lib/mu/command/cmd_runscale_rb.html +0 -62
  176. data/rdoc/lib/mu/command/cmd_runscenario_rb.html +0 -57
  177. data/rdoc/lib/mu/command/cmd_runverify_rb.html +0 -61
  178. data/rdoc/lib/mu/command/cmd_scale_rb.html +0 -58
  179. data/rdoc/lib/mu/command/cmd_system_rb.html +0 -59
  180. data/rdoc/lib/mu/command/curl_rb.html +0 -52
  181. data/rdoc/lib/mu/command/help_rb.html +0 -52
  182. data/rdoc/lib/mu/command_rb.html +0 -55
  183. data/rdoc/lib/mu/curl/error_rb.html +0 -52
  184. data/rdoc/lib/mu/curl/verify_rb.html +0 -52
  185. data/rdoc/lib/mu/helper_rb.html +0 -52
  186. data/rdoc/lib/mu/http_helper_rb.html +0 -52
  187. data/rdoc/lib/mu_rb.html +0 -80
  188. data/rdoc/rdoc-style.css +0 -208
  189. data/rdoc/rdoc.css +0 -706
  190. data/test/data/app_id_stats.csv +0 -1
  191. data/test/data/app_id_status.json +0 -156
  192. data/test/data/data_cgi.msl +0 -94
  193. data/test/data/data_cgi.xml +0 -322
  194. data/test/data/default_test.csv +0 -3
  195. data/test/data/ftp_with_channel.xml +0 -1643
  196. data/test/data/irc.xml +0 -3837
  197. data/test/data/scale.json +0 -25
  198. data/test/data/test_data_cgi_error.xml +0 -35
@@ -1,1441 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
-
8
- <title>Class: Mu::Command::Cmd_runscale</title>
9
-
10
- <link rel="stylesheet" href="../../rdoc.css" type="text/css" media="screen" />
11
-
12
- <script src="../../js/jquery.js" type="text/javascript"
13
- charset="utf-8"></script>
14
- <script src="../../js/thickbox-compressed.js" type="text/javascript"
15
- charset="utf-8"></script>
16
- <script src="../../js/quicksearch.js" type="text/javascript"
17
- charset="utf-8"></script>
18
- <script src="../../js/darkfish.js" type="text/javascript"
19
- charset="utf-8"></script>
20
-
21
- </head>
22
- <body class="class">
23
-
24
- <div id="metadata">
25
- <div id="home-metadata">
26
- <div id="home-section" class="section">
27
- <h3 class="section-header">
28
- <a href="../../index.html">Home</a>
29
- <a href="../../index.html#classes">Classes</a>
30
- <a href="../../index.html#methods">Methods</a>
31
- </h3>
32
- </div>
33
- </div>
34
-
35
- <div id="file-metadata">
36
- <div id="file-list-section" class="section">
37
- <h3 class="section-header">In Files</h3>
38
- <div class="section-body">
39
- <ul>
40
-
41
- <li><a href="../../lib/mu/command/cmd_runscale_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
- class="thickbox" title="lib/mu/command/cmd_runscale.rb">lib/mu/command/cmd_runscale.rb</a></li>
43
-
44
- </ul>
45
- </div>
46
- </div>
47
-
48
-
49
- </div>
50
-
51
- <div id="class-metadata">
52
-
53
- <!-- Parent Class -->
54
-
55
- <div id="parent-class-section" class="section">
56
- <h3 class="section-header">Parent</h3>
57
-
58
- <p class="link"><a href="../Command.html">Mu::Command</a></p>
59
-
60
- </div>
61
-
62
-
63
- <!-- Namespace Contents -->
64
-
65
-
66
- <!-- Method Quickref -->
67
-
68
- <div id="method-list-section" class="section">
69
- <h3 class="section-header">Methods</h3>
70
- <ul class="link-list">
71
-
72
- <li><a href="#method-i-cmd_help">#cmd_help</a></li>
73
-
74
- <li><a href="#method-i-cmd_run_dir">#cmd_run_dir</a></li>
75
-
76
- <li><a href="#method-i-cmd_run_file">#cmd_run_file</a></li>
77
-
78
- <li><a href="#method-i-cmd_running%3F">#cmd_running?</a></li>
79
-
80
- <li><a href="#method-i-configure_hosts">#configure_hosts</a></li>
81
-
82
- <li><a href="#method-i-dump_status">#dump_status</a></li>
83
-
84
- <li><a href="#method-i-help">#help</a></li>
85
-
86
- <li><a href="#method-i-output_csv">#output_csv</a></li>
87
-
88
- <li><a href="#method-i-parse_cli">#parse_cli</a></li>
89
-
90
- <li><a href="#method-i-parse_status">#parse_status</a></li>
91
-
92
- <li><a href="#method-i-parse_verify_response">#parse_verify_response</a></li>
93
-
94
- <li><a href="#method-i-run">#run</a></li>
95
-
96
- <li><a href="#method-i-set_hosts">#set_hosts</a></li>
97
-
98
- <li><a href="#method-i-set_hosts_byname">#set_hosts_byname</a></li>
99
-
100
- <li><a href="#method-i-setup">#setup</a></li>
101
-
102
- </ul>
103
- </div>
104
-
105
-
106
- <!-- Included Modules -->
107
-
108
- </div>
109
-
110
- <div id="project-metadata">
111
-
112
-
113
- <div id="fileindex-section" class="section project-section">
114
- <h3 class="section-header">Files</h3>
115
- <ul>
116
-
117
- <li class="file"><a href="../../Gemfile.html">Gemfile</a></li>
118
-
119
- <li class="file"><a href="../../LICENSE_txt.html">LICENSE.txt</a></li>
120
-
121
- <li class="file"><a href="../../README_rdoc.html">README.rdoc</a></li>
122
-
123
- <li class="file"><a href="../../Rakefile.html">Rakefile</a></li>
124
-
125
- <li class="file"><a href="../../VERSION.html">VERSION</a></li>
126
-
127
- </ul>
128
- </div>
129
-
130
-
131
- <div id="classindex-section" class="section project-section">
132
- <h3 class="section-header">Class Index
133
- <span class="search-toggle"><img src="../../images/find.png"
134
- height="16" width="16" alt="[+]"
135
- title="show/hide quicksearch" /></span></h3>
136
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
137
- <fieldset>
138
- <legend>Quicksearch</legend>
139
- <input type="text" name="quicksearch" value=""
140
- class="quicksearch-field" />
141
- </fieldset>
142
- </form>
143
-
144
- <ul class="link-list">
145
-
146
- <li><a href="../../Mu.html">Mu</a></li>
147
-
148
- <li><a href="../../Mu/Client.html">Mu::Client</a></li>
149
-
150
- <li><a href="../../Mu/Command.html">Mu::Command</a></li>
151
-
152
- <li><a href="../../Mu/Command/API.html">Mu::Command::API</a></li>
153
-
154
- <li><a href="../../Mu/Command/API.html">Mu::Command::API</a></li>
155
-
156
- <li><a href="../../Mu/Command/Cmd_appid.html">Mu::Command::Cmd_appid</a></li>
157
-
158
- <li><a href="../../Mu/Command/Cmd_cli.html">Mu::Command::Cmd_cli</a></li>
159
-
160
- <li><a href="../../Mu/Command/Cmd_ddt.html">Mu::Command::Cmd_ddt</a></li>
161
-
162
- <li><a href="../../Mu/Command/Cmd_homepage.html">Mu::Command::Cmd_homepage</a></li>
163
-
164
- <li><a href="../../Mu/Command/Cmd_muapi.html">Mu::Command::Cmd_muapi</a></li>
165
-
166
- <li><a href="../../Mu/Command/Cmd_netconfig.html">Mu::Command::Cmd_netconfig</a></li>
167
-
168
- <li><a href="../../Mu/Command/Cmd_runscale.html">Mu::Command::Cmd_runscale</a></li>
169
-
170
- <li><a href="../../Mu/Command/Cmd_runscenario.html">Mu::Command::Cmd_runscenario</a></li>
171
-
172
- <li><a href="../../Mu/Command/Cmd_runverify.html">Mu::Command::Cmd_runverify</a></li>
173
-
174
- <li><a href="../../Mu/Command/Cmd_scale.html">Mu::Command::Cmd_scale</a></li>
175
-
176
- <li><a href="../../Mu/Command/Cmd_system.html">Mu::Command::Cmd_system</a></li>
177
-
178
- <li><a href="../../Mu/Command/Curl.html">Mu::Command::Curl</a></li>
179
-
180
- <li><a href="../../Mu/Command/Help.html">Mu::Command::Help</a></li>
181
-
182
- <li><a href="../../Mu/Curl.html">Mu::Curl</a></li>
183
-
184
- <li><a href="../../Mu/Curl/Error.html">Mu::Curl::Error</a></li>
185
-
186
- <li><a href="../../Mu/Curl/Error/Authorize.html">Mu::Curl::Error::Authorize</a></li>
187
-
188
- <li><a href="../../Mu/Curl/Error/Connect.html">Mu::Curl::Error::Connect</a></li>
189
-
190
- <li><a href="../../Mu/Curl/Error/DNS.html">Mu::Curl::Error::DNS</a></li>
191
-
192
- <li><a href="../../Mu/Curl/Error/Region.html">Mu::Curl::Error::Region</a></li>
193
-
194
- <li><a href="../../Mu/Curl/Error/Status.html">Mu::Curl::Error::Status</a></li>
195
-
196
- <li><a href="../../Mu/Curl/Error/Timeout.html">Mu::Curl::Error::Timeout</a></li>
197
-
198
- <li><a href="../../Mu/Curl/Verify.html">Mu::Curl::Verify</a></li>
199
-
200
- <li><a href="../../Mu/Curl/Verify/Request.html">Mu::Curl::Verify::Request</a></li>
201
-
202
- <li><a href="../../Mu/Curl/Verify/Response.html">Mu::Curl::Verify::Response</a></li>
203
-
204
- <li><a href="../../Mu/Curl/Verify/Result.html">Mu::Curl::Verify::Result</a></li>
205
-
206
- <li><a href="../../Mu/Ddt.html">Mu::Ddt</a></li>
207
-
208
- <li><a href="../../Mu/Helper.html">Mu::Helper</a></li>
209
-
210
- <li><a href="../../Mu/Homepage.html">Mu::Homepage</a></li>
211
-
212
- <li><a href="../../Mu/HttpHelper.html">Mu::HttpHelper</a></li>
213
-
214
- <li><a href="../../Mu/Muapi.html">Mu::Muapi</a></li>
215
-
216
- <li><a href="../../Mu/Netconfig.html">Mu::Netconfig</a></li>
217
-
218
- <li><a href="../../Mu/Scale.html">Mu::Scale</a></li>
219
-
220
- <li><a href="../../Mu/System.html">Mu::System</a></li>
221
-
222
- <li><a href="../../Test.html">Test</a></li>
223
-
224
- <li><a href="../../Test/Unit.html">Test::Unit</a></li>
225
-
226
- <li><a href="../../Test/Unit/TestCase.html">Test::Unit::TestCase</a></li>
227
-
228
- <li><a href="../../Object.html">Object</a></li>
229
-
230
- <li><a href="../../TCTestMu.html">TCTestMu</a></li>
231
-
232
- </ul>
233
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
234
- </div>
235
-
236
-
237
- </div>
238
- </div>
239
-
240
- <div id="documentation">
241
- <h1 class="class">Mu::Command::Cmd_runscale</h1>
242
-
243
- <div id="description">
244
-
245
- </div>
246
-
247
- <!-- Constants -->
248
-
249
-
250
- <!-- Attributes -->
251
-
252
- <div id="attribute-method-details" class="method-section section">
253
- <h3 class="section-header">Attributes</h3>
254
-
255
-
256
- <div id="api-attribute-method" class="method-detail">
257
- <a name="api"></a>
258
-
259
- <a name="api="></a>
260
-
261
- <div class="method-heading attribute-method-heading">
262
- <span class="method-name">api</span><span
263
- class="attribute-access-type">[RW]</span>
264
- </div>
265
-
266
- <div class="method-description">
267
-
268
-
269
-
270
- </div>
271
- </div>
272
-
273
- <div id="params-attribute-method" class="method-detail">
274
- <a name="params"></a>
275
-
276
- <a name="params="></a>
277
-
278
- <div class="method-heading attribute-method-heading">
279
- <span class="method-name">params</span><span
280
- class="attribute-access-type">[RW]</span>
281
- </div>
282
-
283
- <div class="method-description">
284
-
285
-
286
-
287
- </div>
288
- </div>
289
-
290
- <div id="hosts-attribute-method" class="method-detail">
291
- <a name="hosts"></a>
292
-
293
- <a name="hosts="></a>
294
-
295
- <div class="method-heading attribute-method-heading">
296
- <span class="method-name">hosts</span><span
297
- class="attribute-access-type">[RW]</span>
298
- </div>
299
-
300
- <div class="method-description">
301
-
302
-
303
-
304
- </div>
305
- </div>
306
-
307
- <div id="addr-indexes-attribute-method" class="method-detail">
308
- <a name="addr_indexes"></a>
309
-
310
- <a name="addr_indexes="></a>
311
-
312
- <div class="method-heading attribute-method-heading">
313
- <span class="method-name">addr_indexes</span><span
314
- class="attribute-access-type">[RW]</span>
315
- </div>
316
-
317
- <div class="method-description">
318
-
319
-
320
-
321
- </div>
322
- </div>
323
-
324
- <div id="offset-indexes-attribute-method" class="method-detail">
325
- <a name="offset_indexes"></a>
326
-
327
- <a name="offset_indexes="></a>
328
-
329
- <div class="method-heading attribute-method-heading">
330
- <span class="method-name">offset_indexes</span><span
331
- class="attribute-access-type">[RW]</span>
332
- </div>
333
-
334
- <div class="method-description">
335
-
336
-
337
-
338
- </div>
339
- </div>
340
-
341
- <div id="peak-concurrency-attribute-method" class="method-detail">
342
- <a name="peak_concurrency"></a>
343
-
344
- <a name="peak_concurrency="></a>
345
-
346
- <div class="method-heading attribute-method-heading">
347
- <span class="method-name">peak_concurrency</span><span
348
- class="attribute-access-type">[RW]</span>
349
- </div>
350
-
351
- <div class="method-description">
352
-
353
-
354
-
355
- </div>
356
- </div>
357
-
358
- <div id="peak-throughput-attribute-method" class="method-detail">
359
- <a name="peak_throughput"></a>
360
-
361
- <a name="peak_throughput="></a>
362
-
363
- <div class="method-heading attribute-method-heading">
364
- <span class="method-name">peak_throughput</span><span
365
- class="attribute-access-type">[RW]</span>
366
- </div>
367
-
368
- <div class="method-description">
369
-
370
-
371
-
372
- </div>
373
- </div>
374
-
375
- </div>
376
-
377
-
378
- <!-- Methods -->
379
-
380
- <div id="public-instance-method-details" class="method-section section">
381
- <h3 class="section-header">Public Instance Methods</h3>
382
-
383
-
384
- <div id="cmd-help-method" class="method-detail ">
385
- <a name="method-i-cmd_help"></a>
386
-
387
- <div class="method-heading">
388
-
389
- <span class="method-name">cmd_help</span><span
390
- class="method-args">(argv)</span>
391
- <span class="method-click-advice">click to toggle source</span>
392
-
393
- </div>
394
-
395
- <div class="method-description">
396
-
397
- <p>
398
- displays command-line help
399
- </p>
400
- <pre>
401
- * argv = command-line arguments</pre>
402
-
403
-
404
-
405
- <div class="method-source-code"
406
- id="cmd-help-source">
407
- <pre>
408
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 14</span>
409
- 14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_help</span> <span class="ruby-identifier">argv</span>
410
- 15: <span class="ruby-identifier">help</span>
411
- 16: <span class="ruby-keyword kw">end</span></pre>
412
- </div>
413
-
414
- </div>
415
-
416
-
417
-
418
-
419
- </div>
420
-
421
-
422
- <div id="cmd-run-dir-method" class="method-detail ">
423
- <a name="method-i-cmd_run_dir"></a>
424
-
425
- <div class="method-heading">
426
-
427
- <span class="method-name">cmd_run_dir</span><span
428
- class="method-args">(argv)</span>
429
- <span class="method-click-advice">click to toggle source</span>
430
-
431
- </div>
432
-
433
- <div class="method-description">
434
-
435
- <p>
436
- sets up, executes, and closes a Studio <a href="../Scale.html">Scale</a>
437
- test for each scenario (.msl file) found in the specified directory
438
- </p>
439
- <pre>
440
- * argv = command-line arguments, requires a directory (-d) argument
441
- * optional -r argument for recursive directory search (default is a flat directory)</pre>
442
-
443
-
444
-
445
- <div class="method-source-code"
446
- id="cmd-run-dir-source">
447
- <pre>
448
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 60</span>
449
- 60: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_run_dir</span> <span class="ruby-identifier">argv</span>
450
- 61: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
451
- 62:
452
- 63: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'dir'</span>]
453
- 64: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">help</span>
454
- 65: <span class="ruby-keyword kw">else</span>
455
- 66: <span class="ruby-ivar">@dir</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'dir'</span>]
456
- 67: <span class="ruby-keyword kw">end</span>
457
- 68:
458
- 69: <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;app_id_status.json&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-value str">&quot;app_id_status.json&quot;</span>)
459
- 70: <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;app_id_stats.csv&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-value str">&quot;app_id_stats.csv&quot;</span>)
460
- 71:
461
- 72: <span class="ruby-ivar">@api</span> = <span class="ruby-constant">Scale</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">@@mu_ip</span>, <span class="ruby-identifier">@@mu_admin_user</span>, <span class="ruby-identifier">@@mu_admin_pass</span>)
462
- 73: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">&quot;pattern&quot;</span>, <span class="ruby-ivar">@cmd_line_pattern</span>)
463
- 74: <span class="ruby-ivar">@params</span> = {}
464
- 75: <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;dir&quot;</span>] = <span class="ruby-ivar">@dir</span>
465
- 76: <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;hosts&quot;</span>] = <span class="ruby-ivar">@cmd_line_hosts</span>
466
- 77: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;dir&quot;</span>])
467
- 78: <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;app_id_status.json&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-value str">&quot;app_id_status.json&quot;</span>)
468
- 79: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'recursive'</span>].<span class="ruby-identifier">nil?</span>
469
- 80: <span class="ruby-identifier">files</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-value str">&quot;*.msl&quot;</span>)
470
- 81: <span class="ruby-keyword kw">else</span>
471
- 82: <span class="ruby-identifier">files</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-value str">&quot;**/*.msl&quot;</span>)
472
- 83: <span class="ruby-keyword kw">end</span>
473
- 84: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">files</span>.<span class="ruby-identifier">empty?</span>
474
- 85: <span class="ruby-identifier">files</span>.<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">|</span>
475
- 86: <span class="ruby-identifier">run</span>(<span class="ruby-identifier">f</span>)
476
- 87: <span class="ruby-identifier">output_csv</span>(<span class="ruby-identifier">f</span>)
477
- 88: <span class="ruby-identifier">sleep</span> <span class="ruby-value">2</span>
478
- 89: <span class="ruby-keyword kw">end</span>
479
- 90: <span class="ruby-keyword kw">else</span>
480
- 91: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;no msl files found in #{@dir}&quot;</span>
481
- 92: <span class="ruby-keyword kw">end</span>
482
- 93: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">release</span>
483
- 94: <span class="ruby-keyword kw">end</span></pre>
484
- </div>
485
-
486
- </div>
487
-
488
-
489
-
490
-
491
- </div>
492
-
493
-
494
- <div id="cmd-run-file-method" class="method-detail ">
495
- <a name="method-i-cmd_run_file"></a>
496
-
497
- <div class="method-heading">
498
-
499
- <span class="method-name">cmd_run_file</span><span
500
- class="method-args">(argv)</span>
501
- <span class="method-click-advice">click to toggle source</span>
502
-
503
- </div>
504
-
505
- <div class="method-description">
506
-
507
- <p>
508
- sets up, executes, and closes a Studio <a href="../Scale.html">Scale</a>
509
- test
510
- </p>
511
- <pre>
512
- * argv = command-line arguments , requires a scenario (-s) argument</pre>
513
-
514
-
515
-
516
- <div class="method-source-code"
517
- id="cmd-run-file-source">
518
- <pre>
519
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 20</span>
520
- 20: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_run_file</span> <span class="ruby-identifier">argv</span>
521
- 21: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
522
- 22:
523
- 23: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'scenario'</span>]
524
- 24: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;scenario required&quot;</span>
525
- 25: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">help</span>
526
- 26: <span class="ruby-keyword kw">else</span>
527
- 27: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'scenario'</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;.msl&quot;</span>)
528
- 28: <span class="ruby-identifier">scenario</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'scenario'</span>]
529
- 29: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># TODO: eventually, xml and mus file may be supported by scale api</span>
530
- 30: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;only .msl files are currently supported&quot;</span>
531
- 31: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">help</span>
532
- 32: <span class="ruby-keyword kw">end</span>
533
- 33: <span class="ruby-keyword kw">end</span>
534
- 34:
535
- 35: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'dir'</span>]
536
- 36: <span class="ruby-ivar">@dir</span> = <span class="ruby-value str">&quot;&quot;</span>
537
- 37: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">scenario</span>
538
- 38: <span class="ruby-keyword kw">else</span>
539
- 39: <span class="ruby-ivar">@dir</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'dir'</span>]
540
- 40: <span class="ruby-identifier">path</span> = <span class="ruby-ivar">@dir</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;/&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">scenario</span>
541
- 41: <span class="ruby-keyword kw">end</span>
542
- 42:
543
- 43: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">path</span>)
544
- 44: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;*** Error: File #{path} does not exist&quot;</span>
545
- 45: <span class="ruby-keyword kw">end</span>
546
- 46:
547
- 47: <span class="ruby-ivar">@api</span> = <span class="ruby-constant">Scale</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">@@mu_ip</span>, <span class="ruby-identifier">@@mu_admin_user</span>, <span class="ruby-identifier">@@mu_admin_pass</span>)
548
- 48: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">&quot;pattern&quot;</span>, <span class="ruby-ivar">@cmd_line_pattern</span>)
549
- 49: <span class="ruby-ivar">@params</span> = {}
550
- 50: <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;dir&quot;</span>] = <span class="ruby-ivar">@dir</span>
551
- 51: <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;msl&quot;</span>] = <span class="ruby-identifier">scenario</span>
552
- 52: <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;hosts&quot;</span>] = <span class="ruby-ivar">@cmd_line_hosts</span>
553
- 53: <span class="ruby-identifier">run</span>(<span class="ruby-identifier">scenario</span>)
554
- 54: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">release</span>
555
- 55: <span class="ruby-keyword kw">end</span></pre>
556
- </div>
557
-
558
- </div>
559
-
560
-
561
-
562
-
563
- </div>
564
-
565
-
566
- </div>
567
-
568
- <div id="private-instance-method-details" class="method-section section">
569
- <h3 class="section-header">Private Instance Methods</h3>
570
-
571
-
572
- <div id="cmd-running--method" class="method-detail ">
573
- <a name="method-i-cmd_running%3F"></a>
574
-
575
- <div class="method-heading">
576
-
577
- <span class="method-name">cmd_running?</span><span
578
- class="method-args">()</span>
579
- <span class="method-click-advice">click to toggle source</span>
580
-
581
- </div>
582
-
583
- <div class="method-description">
584
-
585
-
586
-
587
-
588
-
589
- <div class="method-source-code"
590
- id="cmd-running--source">
591
- <pre>
592
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 233</span>
593
- 233: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_running?</span>
594
- 234: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">nil?</span>
595
- 235: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;false&quot;</span>
596
- 236: <span class="ruby-keyword kw">return</span>
597
- 237: <span class="ruby-keyword kw">end</span>
598
- 238:
599
- 239: <span class="ruby-identifier">status</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">status</span>
600
- 240: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>.<span class="ruby-identifier">nil?</span>
601
- 241: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>[<span class="ruby-value str">&quot;status&quot;</span>].<span class="ruby-identifier">nil?</span>
602
- 242: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">status</span>[<span class="ruby-value str">&quot;status&quot;</span>][<span class="ruby-value str">&quot;running&quot;</span>]
603
- 243: <span class="ruby-keyword kw">end</span>
604
- 244: <span class="ruby-keyword kw">else</span>
605
- 245: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;false&quot;</span>
606
- 246: <span class="ruby-keyword kw">end</span>
607
- 247: <span class="ruby-keyword kw">end</span></pre>
608
- </div>
609
-
610
- </div>
611
-
612
-
613
-
614
-
615
- </div>
616
-
617
-
618
- <div id="configure-hosts-method" class="method-detail ">
619
- <a name="method-i-configure_hosts"></a>
620
-
621
- <div class="method-heading">
622
-
623
- <span class="method-name">configure_hosts</span><span
624
- class="method-args">()</span>
625
- <span class="method-click-advice">click to toggle source</span>
626
-
627
- </div>
628
-
629
- <div class="method-description">
630
-
631
-
632
-
633
-
634
-
635
- <div class="method-source-code"
636
- id="configure-hosts-source">
637
- <pre>
638
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 249</span>
639
- 249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure_hosts</span>
640
- 250: <span class="ruby-ivar">@hosts</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
641
- 251: <span class="ruby-ivar">@addr_indexes</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
642
- 252: <span class="ruby-ivar">@offset_indexes</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
643
- 253: <span class="ruby-identifier">hosts</span> = <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;hosts&quot;</span>]
644
- 254: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">nil?</span>
645
- 255: <span class="ruby-identifier">p</span> = <span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;,&quot;</span>)
646
- 256: <span class="ruby-identifier">p</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">h</span> <span class="ruby-operator">|</span>
647
- 257: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;-&quot;</span>) <span class="ruby-comment cmt"># b1-1000,b2-1 to indicate addr_count</span>
648
- 258: <span class="ruby-identifier">q</span> = <span class="ruby-identifier">h</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;-&quot;</span>)
649
- 259: <span class="ruby-ivar">@hosts</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">q</span>[<span class="ruby-value">0</span>]
650
- 260: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">q</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;:&quot;</span>) <span class="ruby-comment cmt"># -1000:20 to indicate offset within range</span>
651
- 261: <span class="ruby-identifier">r</span> = <span class="ruby-identifier">q</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;:&quot;</span>)
652
- 262: <span class="ruby-ivar">@addr_indexes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">r</span>[<span class="ruby-value">0</span>]
653
- 263: <span class="ruby-ivar">@offset_indexes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">r</span>[<span class="ruby-value">1</span>]
654
- 264: <span class="ruby-keyword kw">else</span>
655
- 265: <span class="ruby-ivar">@addr_indexes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">q</span>[<span class="ruby-value">1</span>]
656
- 266: <span class="ruby-ivar">@offset_indexes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value">1</span>
657
- 267: <span class="ruby-keyword kw">end</span>
658
- 268: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># default to the 1st addr index</span>
659
- 269: <span class="ruby-ivar">@hosts</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">h</span>
660
- 270: <span class="ruby-ivar">@addr_indexes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value">1</span>
661
- 271: <span class="ruby-ivar">@offset_indexes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value">1</span>
662
- 272: <span class="ruby-keyword kw">end</span>
663
- 273: <span class="ruby-keyword kw">end</span>
664
- 274: <span class="ruby-keyword kw">else</span>
665
- 275: <span class="ruby-ivar">@hosts</span> = [<span class="ruby-value str">'b1'</span>,<span class="ruby-value str">'b2'</span>]
666
- 276: <span class="ruby-ivar">@addr_indexes</span> = [<span class="ruby-value">1</span>,<span class="ruby-value">1</span>]
667
- 277: <span class="ruby-ivar">@offset_indexes</span> = [<span class="ruby-value">1</span>,<span class="ruby-value">1</span>]
668
- 278: <span class="ruby-keyword kw">end</span>
669
- 279:
670
- 280: <span class="ruby-identifier">set_hosts_byname</span>(<span class="ruby-ivar">@hosts</span>, <span class="ruby-ivar">@addr_indexes</span>, <span class="ruby-ivar">@offset_indexes</span>)
671
- 281: <span class="ruby-keyword kw">end</span></pre>
672
- </div>
673
-
674
- </div>
675
-
676
-
677
-
678
-
679
- </div>
680
-
681
-
682
- <div id="dump-status-method" class="method-detail ">
683
- <a name="method-i-dump_status"></a>
684
-
685
- <div class="method-heading">
686
-
687
- <span class="method-name">dump_status</span><span
688
- class="method-args">(status, msl)</span>
689
- <span class="method-click-advice">click to toggle source</span>
690
-
691
- </div>
692
-
693
- <div class="method-description">
694
-
695
-
696
-
697
-
698
-
699
- <div class="method-source-code"
700
- id="dump-status-source">
701
- <pre>
702
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 337</span>
703
- 337: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump_status</span>(<span class="ruby-identifier">status</span>, <span class="ruby-identifier">msl</span>)
704
- 338: <span class="ruby-identifier">filename</span> = <span class="ruby-value str">&quot;app_id_status.json&quot;</span>
705
- 339: <span class="ruby-identifier">f</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">&quot;a&quot;</span>)
706
- 340: <span class="ruby-identifier">status</span>[<span class="ruby-value str">&quot;filename&quot;</span>] = <span class="ruby-identifier">msl</span>
707
- 341: <span class="ruby-identifier">str</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">pretty_generate</span>(<span class="ruby-identifier">status</span>)
708
- 342: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">&quot;,&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">zero?</span>(<span class="ruby-identifier">f</span>) <span class="ruby-comment cmt"># if appending, we need to insert a comma</span>
709
- 343: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">str</span>)
710
- 344: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">close</span>
711
- 345: <span class="ruby-keyword kw">end</span></pre>
712
- </div>
713
-
714
- </div>
715
-
716
-
717
-
718
-
719
- </div>
720
-
721
-
722
- <div id="help-method" class="method-detail ">
723
- <a name="method-i-help"></a>
724
-
725
- <div class="method-heading">
726
-
727
- <span class="method-name">help</span><span
728
- class="method-args">()</span>
729
- <span class="method-click-advice">click to toggle source</span>
730
-
731
- </div>
732
-
733
- <div class="method-description">
734
-
735
-
736
-
737
-
738
-
739
- <div class="method-source-code"
740
- id="help-source">
741
- <pre>
742
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 560</span>
743
- 560: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">help</span>
744
- 561: <span class="ruby-identifier">helps</span> = [
745
- 562: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-a'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--vector_address_pairing'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'sets vectorAddressPairing to true (limits and maps concurrency to the rows in the testset)'</span> },
746
- 563: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-c'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--csv'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'name of the csv testset to run'</span> },
747
- 564: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-d'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--dir'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'directory containing the scenario file'</span> },
748
- 565: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-f'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--default_host'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'default_host setting'</span> },
749
- 566: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-h'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--help'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'help on command line options'</span> },
750
- 567: <span class="ruby-comment cmt"># { :short =&gt; '-hold', :long =&gt; '--hold_concurrency', :value =&gt; '', :help =&gt; 'sets holdConcurrency to tru' },</span>
751
- 568: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-i'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--interfaces'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'comma-separated list of interfaces, e.g. b1,b2 or b1-1000,b2 for ip range'</span> },
752
- 569: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-l'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--delay'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'intra-scenario delay value'</span> },
753
- 570: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-m'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--mu_string'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'user, password, mu_ip in the form of admin:admin@10.9.8.7'</span> },
754
- 571: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-n'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--no_verify'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'do not do verify before start'</span> },
755
- 572: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-o'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--output'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'output logging to this file'</span> },
756
- 573: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-p'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--pattern'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'pattern in the form of comma-separated concurrency_start-end:duration patterns, e.g. 1-100:60,100-100:60,100-1:60'</span> },
757
- 574: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-r'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--recursive'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'for run_dir, recurse through sub-directories'</span> },
758
- 575: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-s'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--scenario'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'&lt;string&gt;'</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'scenario file to run'</span> },
759
- 576: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-t'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--test'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'do verify only'</span> },
760
- 577: { <span class="ruby-value">:short</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'-v'</span>, <span class="ruby-value">:long</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'--verbose'</span>, <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>, <span class="ruby-value">:help</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'set Logger::DEBUG level'</span> }
761
- 578: ]
762
- 579:
763
- 580: <span class="ruby-identifier">cmds</span> = [
764
- 581: <span class="ruby-value str">&quot;mu cmd_runscale:help&quot;</span>,
765
- 582: <span class="ruby-value str">&quot;mu cmd_runscale:run_file -s &lt;scenario&gt; -i &lt;hosts, e.g. a1,dell-9&gt; -p &lt;pattern, e.g. 1-1000:30&gt;&quot;</span>,
766
- 583: <span class="ruby-value str">&quot;mu cmd_runscale:run_dir -d &lt;scenario_directory&gt;&quot;</span>,
767
- 584: <span class="ruby-value str">&quot;mu cmd_runscale:running?&quot;</span>
768
- 585: ]
769
- 586:
770
- 587: <span class="ruby-identifier">max_long_size</span> = <span class="ruby-identifier">helps</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">memo</span>, <span class="ruby-identifier">obj</span><span class="ruby-operator">|</span> [ <span class="ruby-identifier">obj</span>[<span class="ruby-value">:long</span>].<span class="ruby-identifier">size</span>, <span class="ruby-identifier">memo</span> ].<span class="ruby-identifier">max</span> }
771
- 588: <span class="ruby-identifier">max_value_size</span> = <span class="ruby-identifier">helps</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">memo</span>, <span class="ruby-identifier">obj</span><span class="ruby-operator">|</span> [ <span class="ruby-identifier">obj</span>[<span class="ruby-value">:value</span>].<span class="ruby-identifier">size</span>, <span class="ruby-identifier">memo</span> ].<span class="ruby-identifier">max</span> }
772
- 589: <span class="ruby-identifier">puts</span>
773
- 590: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Usage: mu cmd_runscale:&lt;command&gt; &lt;options&gt;&quot;</span>
774
- 591: <span class="ruby-identifier">puts</span>
775
- 592: <span class="ruby-identifier">helps</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span>
776
- 593: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;%-*s %*s %-*s %s&quot;</span> <span class="ruby-operator">%</span> [<span class="ruby-identifier">max_long_size</span>, <span class="ruby-identifier">h</span>[<span class="ruby-value">:long</span>], <span class="ruby-value">2</span>, <span class="ruby-identifier">h</span>[<span class="ruby-value">:short</span>], <span class="ruby-identifier">max_value_size</span>, <span class="ruby-identifier">h</span>[<span class="ruby-value">:value</span>], <span class="ruby-identifier">h</span>[<span class="ruby-value">:help</span>]]
777
- 594: <span class="ruby-keyword kw">end</span>
778
- 595: <span class="ruby-identifier">puts</span>
779
- 596: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Available Commands&quot;</span>
780
- 597: <span class="ruby-identifier">puts</span>
781
- 598: <span class="ruby-identifier">cmds</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">|</span>
782
- 599: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">c</span>
783
- 600: <span class="ruby-keyword kw">end</span>
784
- 601: <span class="ruby-identifier">puts</span>
785
- 602: <span class="ruby-keyword kw">end</span></pre>
786
- </div>
787
-
788
- </div>
789
-
790
-
791
-
792
-
793
- </div>
794
-
795
-
796
- <div id="output-csv-method" class="method-detail ">
797
- <a name="method-i-output_csv"></a>
798
-
799
- <div class="method-heading">
800
-
801
- <span class="method-name">output_csv</span><span
802
- class="method-args">(msl_file)</span>
803
- <span class="method-click-advice">click to toggle source</span>
804
-
805
- </div>
806
-
807
- <div class="method-description">
808
-
809
-
810
-
811
-
812
-
813
- <div class="method-source-code"
814
- id="output-csv-source">
815
- <pre>
816
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 347</span>
817
- 347: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output_csv</span>(<span class="ruby-identifier">msl_file</span>)
818
- 348: <span class="ruby-identifier">filename</span> = <span class="ruby-value str">&quot;app_id_stats.csv&quot;</span>
819
- 349: <span class="ruby-identifier">f</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">&quot;a&quot;</span>)
820
- 350: <span class="ruby-identifier">doc</span> = <span class="ruby-node">&quot;#{msl_file},#{@executed},#{@errors.to_i},#{@timeouts.to_i},#{@client_tx_bytes},#{@client_tx_msgs},#{@client_rx_bytes},#{@client_rx_msgs},#{@server_tx_bytes},#{@server_tx_msgs},#{@server_rx_bytes},#{@server_rx_msgs}\n&quot;</span>
821
- 351: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">'a'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">doc</span>) }
822
- 352: <span class="ruby-keyword kw">end</span></pre>
823
- </div>
824
-
825
- </div>
826
-
827
-
828
-
829
-
830
- </div>
831
-
832
-
833
- <div id="parse-cli-method" class="method-detail ">
834
- <a name="method-i-parse_cli"></a>
835
-
836
- <div class="method-heading">
837
-
838
- <span class="method-name">parse_cli</span><span
839
- class="method-args">(argv)</span>
840
- <span class="method-click-advice">click to toggle source</span>
841
-
842
- </div>
843
-
844
- <div class="method-description">
845
-
846
-
847
-
848
-
849
-
850
- <div class="method-source-code"
851
- id="parse-cli-source">
852
- <pre>
853
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 444</span>
854
- 444: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
855
- 445: <span class="ruby-ivar">@hash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
856
- 446: <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">empty?</span>
857
- 447: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">first</span>[<span class="ruby-value">0</span>,<span class="ruby-value">1</span>] <span class="ruby-operator">!=</span> <span class="ruby-value str">'-'</span>
858
- 448:
859
- 449: <span class="ruby-identifier">k</span> = <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">shift</span>
860
- 450:
861
- 451: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-a'</span>, <span class="ruby-value str">'--vector_address_pairing'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
862
- 452: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'vector_address_pairing'</span>] = <span class="ruby-keyword kw">true</span>
863
- 453: <span class="ruby-keyword kw">next</span>
864
- 454: <span class="ruby-keyword kw">end</span>
865
- 455:
866
- 456: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-c'</span>, <span class="ruby-value str">'--csv'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
867
- 457: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'testset'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
868
- 458: <span class="ruby-keyword kw">next</span>
869
- 459: <span class="ruby-keyword kw">end</span>
870
- 460:
871
- 461: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-d'</span>, <span class="ruby-value str">'--dir'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
872
- 462: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'dir'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
873
- 463: <span class="ruby-keyword kw">next</span>
874
- 464: <span class="ruby-keyword kw">end</span>
875
- 465:
876
- 466: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-f'</span>, <span class="ruby-value str">'--default_host'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
877
- 467: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'default_host'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
878
- 468: <span class="ruby-keyword kw">next</span>
879
- 469: <span class="ruby-keyword kw">end</span>
880
- 470:
881
- 471: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-i'</span>, <span class="ruby-value str">'--interfaces'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
882
- 472: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'interfaces'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
883
- 473: <span class="ruby-keyword kw">next</span>
884
- 474: <span class="ruby-keyword kw">end</span>
885
- 475:
886
- 476: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-h'</span>, <span class="ruby-value str">'--help'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
887
- 477: <span class="ruby-identifier">help</span>
888
- 478: <span class="ruby-identifier">exit</span>
889
- 479: <span class="ruby-keyword kw">end</span>
890
- 480: if [ '-hold', '--hold_concurrency' ].member? k @hash['hold_concurrency'] = true next end=end
891
- 481: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-l'</span>, <span class="ruby-value str">'--delay'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
892
- 482: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'delay'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
893
- 483: <span class="ruby-keyword kw">next</span>
894
- 484: <span class="ruby-keyword kw">end</span>
895
- 485:
896
- 486: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-m'</span>, <span class="ruby-value str">'--mu_string'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
897
- 487: <span class="ruby-identifier">mu_string</span> = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
898
- 488: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mu_string</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(.+?):(.+?)@(.*)/</span>
899
- 489: <span class="ruby-identifier">@@mu_admin_user</span> = <span class="ruby-node">$1</span>
900
- 490: <span class="ruby-identifier">@@mu_admin_pass</span> = <span class="ruby-node">$2</span>
901
- 491: <span class="ruby-identifier">@@mu_ip</span> = <span class="ruby-node">$3</span>
902
- 492: <span class="ruby-keyword kw">end</span>
903
- 493: <span class="ruby-keyword kw">next</span>
904
- 494: <span class="ruby-keyword kw">end</span>
905
- 495:
906
- 496: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-n'</span>, <span class="ruby-value str">'--no_verify'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
907
- 497: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'no_verify'</span>] = <span class="ruby-keyword kw">true</span>
908
- 498: <span class="ruby-keyword kw">next</span>
909
- 499: <span class="ruby-keyword kw">end</span>
910
- 500:
911
- 501: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-o'</span>, <span class="ruby-value str">'--output'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
912
- 502: <span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">reopen</span>(<span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>), <span class="ruby-value str">&quot;w&quot;</span>)
913
- 503: <span class="ruby-keyword kw">next</span>
914
- 504: <span class="ruby-keyword kw">end</span>
915
- 505:
916
- 506: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-p'</span>, <span class="ruby-value str">'--pattern'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
917
- 507: <span class="ruby-identifier">patterns</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
918
- 508: <span class="ruby-identifier">pattern_string</span> = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
919
- 509: <span class="ruby-identifier">pstrings</span> = <span class="ruby-identifier">pattern_string</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;,&quot;</span>)
920
- 510: <span class="ruby-identifier">pstrings</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">|</span>
921
- 511: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(.+?)-(.+?):(.*)/</span> <span class="ruby-comment cmt"># e.g. 1-10000:60</span>
922
- 512: <span class="ruby-identifier">start_vol</span> = <span class="ruby-node">$1</span>
923
- 513: <span class="ruby-identifier">end_vol</span> = <span class="ruby-node">$2</span>
924
- 514: <span class="ruby-identifier">duration</span> = <span class="ruby-node">$3</span>
925
- 515: <span class="ruby-identifier">patterns</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;{\&quot;iterations\&quot;:1, \&quot;end\&quot;:#{end_vol}, \&quot;start\&quot;:#{start_vol}, \&quot;duration\&quot;:#{duration} }&quot;</span>
926
- 516: <span class="ruby-keyword kw">end</span>
927
- 517: <span class="ruby-keyword kw">end</span>
928
- 518: <span class="ruby-identifier">ps</span> = <span class="ruby-value str">&quot;{ \&quot;iterations\&quot;: 1, \&quot;intervals\&quot;: [&quot;</span>
929
- 519: <span class="ruby-identifier">patterns</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">|</span>
930
- 520: <span class="ruby-identifier">ps</span> = <span class="ruby-identifier">ps</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;,&quot;</span>
931
- 521: <span class="ruby-keyword kw">end</span>
932
- 522: <span class="ruby-identifier">ps</span> = <span class="ruby-identifier">ps</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">ps</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">-</span><span class="ruby-value">2</span>] <span class="ruby-comment cmt"># remove final comma</span>
933
- 523: <span class="ruby-identifier">ps</span> = <span class="ruby-identifier">ps</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;] }&quot;</span>
934
- 524: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'pattern'</span>] = <span class="ruby-identifier">ps</span>
935
- 525: <span class="ruby-keyword kw">next</span>
936
- 526: <span class="ruby-keyword kw">end</span>
937
- 527:
938
- 528: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-r'</span>, <span class="ruby-value str">'--recursive'</span>].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
939
- 529: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'recursive'</span>] = <span class="ruby-keyword kw">true</span>
940
- 530: <span class="ruby-keyword kw">next</span>
941
- 531: <span class="ruby-keyword kw">end</span>
942
- 532:
943
- 533:
944
- 534: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-s'</span>, <span class="ruby-value str">'--scenario'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
945
- 535: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'scenario'</span>] = <span class="ruby-identifier">shift</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">argv</span>)
946
- 536: <span class="ruby-keyword kw">next</span>
947
- 537: <span class="ruby-keyword kw">end</span>
948
- 538:
949
- 539: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-t'</span>, <span class="ruby-value str">'--test'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
950
- 540: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'test'</span>] = <span class="ruby-keyword kw">true</span>
951
- 541: <span class="ruby-keyword kw">next</span>
952
- 542: <span class="ruby-keyword kw">end</span>
953
- 543:
954
- 544: <span class="ruby-keyword kw">if</span> [ <span class="ruby-value str">'-v'</span>, <span class="ruby-value str">'--verbose'</span> ].<span class="ruby-identifier">member?</span> <span class="ruby-identifier">k</span>
955
- 545: <span class="ruby-identifier">$log</span>.<span class="ruby-identifier">level</span> = <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
956
- 546: <span class="ruby-keyword kw">next</span>
957
- 547: <span class="ruby-keyword kw">end</span>
958
- 548:
959
- 549: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;Unknown option #{k}&quot;</span>
960
- 550: <span class="ruby-keyword kw">end</span>
961
- 551:
962
- 552: <span class="ruby-ivar">@hash</span>
963
- 553: <span class="ruby-keyword kw">end</span></pre>
964
- </div>
965
-
966
- </div>
967
-
968
-
969
-
970
-
971
- </div>
972
-
973
-
974
- <div id="parse-status-method" class="method-detail ">
975
- <a name="method-i-parse_status"></a>
976
-
977
- <div class="method-heading">
978
-
979
- <span class="method-name">parse_status</span><span
980
- class="method-args">(status)</span>
981
- <span class="method-click-advice">click to toggle source</span>
982
-
983
- </div>
984
-
985
- <div class="method-description">
986
-
987
-
988
-
989
-
990
-
991
- <div class="method-source-code"
992
- id="parse-status-source">
993
- <pre>
994
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 378</span>
995
- 378: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_status</span>(<span class="ruby-identifier">status</span>)
996
- 379: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">status</span>.<span class="ruby-identifier">nil?</span>
997
- 380: <span class="ruby-ivar">@reported_volume</span> = <span class="ruby-value">0</span>
998
- 381: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>[<span class="ruby-value str">&quot;status&quot;</span>][<span class="ruby-value str">&quot;error&quot;</span>].<span class="ruby-identifier">nil?</span>
999
- 382: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">status</span>[<span class="ruby-value str">&quot;status&quot;</span>][<span class="ruby-value str">&quot;error&quot;</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span>
1000
- 383: <span class="ruby-ivar">@error</span> = <span class="ruby-identifier">status</span>[<span class="ruby-value str">&quot;status&quot;</span>][<span class="ruby-value str">&quot;error&quot;</span>]
1001
- 384: <span class="ruby-ivar">@reason</span> = <span class="ruby-identifier">status</span>[<span class="ruby-value str">&quot;status&quot;</span>][<span class="ruby-value str">&quot;reason&quot;</span>]
1002
- 385: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;*** Error = #{@error}, reason = #{@reason} ***\n\n&quot;</span>
1003
- 386: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
1004
- 387: <span class="ruby-keyword kw">end</span>
1005
- 388: <span class="ruby-keyword kw">end</span>
1006
- 389:
1007
- 390: <span class="ruby-ivar">@stats_summary</span> = <span class="ruby-identifier">status</span>[<span class="ruby-value str">&quot;status&quot;</span>][<span class="ruby-value str">&quot;statistics&quot;</span>][<span class="ruby-value str">&quot;summary&quot;</span>]
1008
- 391: <span class="ruby-ivar">@duration</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">&quot;duration&quot;</span>]
1009
- 392: <span class="ruby-ivar">@instances</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">&quot;instances&quot;</span>]
1010
- 393: <span class="ruby-ivar">@total_instances</span> = <span class="ruby-ivar">@instances</span>[<span class="ruby-value str">&quot;total&quot;</span>]
1011
- 394: <span class="ruby-ivar">@executed</span> = <span class="ruby-ivar">@instances</span>[<span class="ruby-value str">&quot;executed&quot;</span>]
1012
- 395: <span class="ruby-ivar">@timeouts</span> = <span class="ruby-ivar">@instances</span>[<span class="ruby-value str">&quot;timeouts&quot;</span>]
1013
- 396: <span class="ruby-ivar">@errors</span> = <span class="ruby-ivar">@instances</span>[<span class="ruby-value str">&quot;errors&quot;</span>]
1014
- 397: <span class="ruby-ivar">@asserts_failed</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">&quot;asserts&quot;</span>][<span class="ruby-value str">&quot;failed&quot;</span>]
1015
- 398: <span class="ruby-ivar">@server</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">&quot;server&quot;</span>]
1016
- 399: <span class="ruby-ivar">@server_tx_bytes</span> = <span class="ruby-ivar">@server</span>[<span class="ruby-value str">&quot;tx&quot;</span>][<span class="ruby-value str">&quot;bytes&quot;</span>]
1017
- 400: <span class="ruby-ivar">@server_tx_msgs</span> = <span class="ruby-ivar">@server</span>[<span class="ruby-value str">&quot;tx&quot;</span>][<span class="ruby-value str">&quot;msgs&quot;</span>]
1018
- 401: <span class="ruby-ivar">@server_rx_bytes</span> = <span class="ruby-ivar">@server</span>[<span class="ruby-value str">&quot;rx&quot;</span>][<span class="ruby-value str">&quot;bytes&quot;</span>]
1019
- 402: <span class="ruby-ivar">@server_rx_msgs</span> = <span class="ruby-ivar">@server</span>[<span class="ruby-value str">&quot;rx&quot;</span>][<span class="ruby-value str">&quot;msgs&quot;</span>]
1020
- 403: <span class="ruby-ivar">@client</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">&quot;client&quot;</span>]
1021
- 404: <span class="ruby-ivar">@client_tx_bytes</span> = <span class="ruby-ivar">@client</span>[<span class="ruby-value str">&quot;tx&quot;</span>][<span class="ruby-value str">&quot;bytes&quot;</span>]
1022
- 405: <span class="ruby-ivar">@client_tx_msgs</span> = <span class="ruby-ivar">@client</span>[<span class="ruby-value str">&quot;tx&quot;</span>][<span class="ruby-value str">&quot;msgs&quot;</span>]
1023
- 406: <span class="ruby-ivar">@client_rx_bytes</span> = <span class="ruby-ivar">@client</span>[<span class="ruby-value str">&quot;rx&quot;</span>][<span class="ruby-value str">&quot;bytes&quot;</span>]
1024
- 407: <span class="ruby-ivar">@client_rx_msgs</span> = <span class="ruby-ivar">@client</span>[<span class="ruby-value str">&quot;rx&quot;</span>][<span class="ruby-value str">&quot;msgs&quot;</span>]
1025
- 408: <span class="ruby-ivar">@scenarios</span> = <span class="ruby-identifier">status</span>[<span class="ruby-value str">&quot;status&quot;</span>][<span class="ruby-value str">&quot;statistics&quot;</span>][<span class="ruby-value str">&quot;scenarios&quot;</span>]
1026
- 409: <span class="ruby-ivar">@scenarios</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">scenario</span> <span class="ruby-operator">|</span>
1027
- 410: <span class="ruby-ivar">@reported_volume</span> = <span class="ruby-ivar">@reported_volume</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">scenario</span>[<span class="ruby-value str">&quot;volume&quot;</span>]
1028
- 411: <span class="ruby-keyword kw">end</span>
1029
- 412:
1030
- 413: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@reported_volume</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@peak_concurrency</span>
1031
- 414: <span class="ruby-ivar">@peak_concurrency</span> = <span class="ruby-ivar">@reported_volume</span>.<span class="ruby-identifier">to_i</span>
1032
- 415: <span class="ruby-keyword kw">end</span>
1033
- 416:
1034
- 417: <span class="ruby-identifier">bits1</span> = (<span class="ruby-ivar">@client_tx_bytes</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@client_rx_bytes</span>.<span class="ruby-identifier">to_i</span>) * <span class="ruby-value">8</span>
1035
- 418: <span class="ruby-identifier">dur1</span> = <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_f</span>
1036
- 419: <span class="ruby-identifier">thruput</span> = <span class="ruby-identifier">format_float</span>(<span class="ruby-value">2</span>, <span class="ruby-identifier">bits1</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">dur1</span>)
1037
- 420:
1038
- 421: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">thruput</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@peak_throughput</span>
1039
- 422: <span class="ruby-ivar">@peak_throughput</span> = <span class="ruby-identifier">thruput</span>.<span class="ruby-identifier">to_f</span>
1040
- 423: <span class="ruby-keyword kw">end</span>
1041
- 424:
1042
- 425: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;&quot;</span>
1043
- 426: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;duration: #{format_float(2, @duration)}&quot;</span>
1044
- 427: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;concurrency: #{@reported_volume}&quot;</span>
1045
- 428: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;tests/sec: #{format_float(2, @executed.to_f / @duration)}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
1046
- 429: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;bits/sec: #{thruput}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
1047
- 430: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;passed: #{@executed}&quot;</span>
1048
- 431: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;errors: #{@errors}&quot;</span>
1049
- 432: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;timeouts: #{@timeouts}&quot;</span>
1050
- 433: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;client tx bytes/sec #{format_float(2, @client_tx_bytes.to_f / @duration)}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
1051
- 434: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;client tx msgs/sec #{format_float(2, @client_tx_msgs.to_f / @duration)}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
1052
- 435: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;client rx bytes/sec #{format_float(2, @client_rx_bytes.to_f / @duration)}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
1053
- 436: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;client rx msgs/sec #{format_float(2, @client_rx_msgs.to_f / @duration)}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
1054
- 437: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;server tx bytes/sec #{format_float(2, @server_tx_bytes.to_f / @duration)}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
1055
- 438: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;server tx msgs/sec #{format_float(2, @server_tx_msgs.to_f / @duration)}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
1056
- 439: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;server rx bytes/sec #{format_float(2, @server_rx_bytes.to_f / @duration)}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
1057
- 440: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;server rx msgs/sec #{format_float(2, @server_rx_msgs.to_f / @duration)}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
1058
- 441: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;&quot;</span>
1059
- 442: <span class="ruby-keyword kw">end</span></pre>
1060
- </div>
1061
-
1062
- </div>
1063
-
1064
-
1065
-
1066
-
1067
- </div>
1068
-
1069
-
1070
- <div id="parse-verify-response-method" class="method-detail ">
1071
- <a name="method-i-parse_verify_response"></a>
1072
-
1073
- <div class="method-heading">
1074
-
1075
- <span class="method-name">parse_verify_response</span><span
1076
- class="method-args">(response)</span>
1077
- <span class="method-click-advice">click to toggle source</span>
1078
-
1079
- </div>
1080
-
1081
- <div class="method-description">
1082
-
1083
-
1084
-
1085
-
1086
-
1087
- <div class="method-source-code"
1088
- id="parse-verify-response-source">
1089
- <pre>
1090
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 354</span>
1091
- 354: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_verify_response</span>(<span class="ruby-identifier">response</span>)
1092
- 355: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-comment cmt"># || response.empty?</span>
1093
- 356: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;*** error = no response received from /verify ***\n\n&quot;</span>
1094
- 357: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
1095
- 358: <span class="ruby-keyword kw">end</span>
1096
- 359: <span class="ruby-keyword kw">begin</span>
1097
- 360: <span class="ruby-identifier">msg</span> <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">pretty_generate</span>(<span class="ruby-identifier">response</span>), <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
1098
- 361: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">response</span>[<span class="ruby-value str">&quot;status&quot;</span>].<span class="ruby-identifier">nil?</span>
1099
- 362: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>[<span class="ruby-value str">&quot;status&quot;</span>][<span class="ruby-value str">&quot;error&quot;</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span>
1100
- 363: <span class="ruby-ivar">@error</span> = <span class="ruby-identifier">response</span>[<span class="ruby-value str">&quot;status&quot;</span>][<span class="ruby-value str">&quot;error&quot;</span>]
1101
- 364: <span class="ruby-ivar">@reason</span> = <span class="ruby-identifier">response</span>[<span class="ruby-value str">&quot;status&quot;</span>][<span class="ruby-value str">&quot;reason&quot;</span>]
1102
- 365: <span class="ruby-identifier">dump_status</span>(<span class="ruby-identifier">response</span>)
1103
- 366: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;*** Error = #{@error}, reason = #{@reason} ***\n\n&quot;</span>
1104
- 367: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
1105
- 368: <span class="ruby-keyword kw">end</span>
1106
- 369: <span class="ruby-keyword kw">end</span>
1107
- 370: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;*** verify: okay ***&quot;</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
1108
- 371: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;*** verify: okay ***&quot;</span>
1109
- 372: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
1110
- 373: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">e</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
1111
- 374: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
1112
- 375: <span class="ruby-keyword kw">end</span>
1113
- 376: <span class="ruby-keyword kw">end</span></pre>
1114
- </div>
1115
-
1116
- </div>
1117
-
1118
-
1119
-
1120
-
1121
- </div>
1122
-
1123
-
1124
- <div id="run-method" class="method-detail ">
1125
- <a name="method-i-run"></a>
1126
-
1127
- <div class="method-heading">
1128
-
1129
- <span class="method-name">run</span><span
1130
- class="method-args">(scenario)</span>
1131
- <span class="method-click-advice">click to toggle source</span>
1132
-
1133
- </div>
1134
-
1135
- <div class="method-description">
1136
-
1137
-
1138
-
1139
-
1140
-
1141
- <div class="method-source-code"
1142
- id="run-source">
1143
- <pre>
1144
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 158</span>
1145
- 158: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">scenario</span>)
1146
- 159: <span class="ruby-comment cmt"># assume the scenario and testset files are in dir unless they contain '/'</span>
1147
- 160: <span class="ruby-comment cmt"># in which case they are assumed to be absolute paths</span>
1148
- 161: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">scenario</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;/&quot;</span>)
1149
- 162: <span class="ruby-identifier">musl_file</span> = <span class="ruby-identifier">scenario</span>
1150
- 163: <span class="ruby-keyword kw">else</span>
1151
- 164: <span class="ruby-identifier">musl_file</span> = <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;dir&quot;</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;/&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">scenario</span>
1152
- 165: <span class="ruby-keyword kw">end</span>
1153
- 166: <span class="ruby-comment cmt"># msg musl_file, Logger::DEBUG</span>
1154
- 167: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">&quot;musl&quot;</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">musl_file</span>))
1155
- 168:
1156
- 169: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@testset</span>.<span class="ruby-identifier">empty?</span>
1157
- 170: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@testset</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;/&quot;</span>)
1158
- 171: <span class="ruby-identifier">csv_file</span> = <span class="ruby-ivar">@testset</span>
1159
- 172: <span class="ruby-keyword kw">else</span>
1160
- 173: <span class="ruby-identifier">csv_file</span> = <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;dir&quot;</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;/&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@testset</span>
1161
- 174: <span class="ruby-keyword kw">end</span>
1162
- 175: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">&quot;csv&quot;</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">csv_file</span>))
1163
- 176: <span class="ruby-keyword kw">end</span>
1164
- 177:
1165
- 178: <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;app_id_status.json&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-value str">&quot;app_id_status.json&quot;</span>)
1166
- 179: <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;app_id_stats.csv&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-value str">&quot;app_id_stats.csv&quot;</span>)
1167
- 180:
1168
- 181: <span class="ruby-identifier">configure_hosts</span>
1169
- 182: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">&quot;delay&quot;</span>, <span class="ruby-ivar">@delay</span>)
1170
- 183: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">&quot;vectorAddressPairing&quot;</span>, <span class="ruby-ivar">@vector_address_pairing</span>)
1171
- 184: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">&quot;limitConcurrency&quot;</span>, <span class="ruby-ivar">@limit_concurrency</span>)
1172
- 185: <span class="ruby-comment cmt"># @api.configure(&quot;holdConcurrency&quot;, @hold_concurrency)</span>
1173
- 186:
1174
- 187: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@no_verify</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># don't do verify if no_verify==true</span>
1175
- 188: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;verifying #{scenario} ...&quot;</span>
1176
- 189: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">verify</span>
1177
- 190: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">response</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
1178
- 191: <span class="ruby-comment cmt"># sleep 3</span>
1179
- 192: <span class="ruby-identifier">v</span> = <span class="ruby-identifier">parse_verify_response</span>(<span class="ruby-identifier">response</span>)
1180
- 193: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;#{v}&quot;</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
1181
- 194: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">nil?</span>
1182
- 195: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;error in verify&quot;</span>
1183
- 196: <span class="ruby-keyword kw">return</span>
1184
- 197: <span class="ruby-keyword kw">end</span>
1185
- 198: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@verify_only</span>
1186
- 199: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">v</span>
1187
- 200: <span class="ruby-keyword kw">return</span>
1188
- 201: <span class="ruby-keyword kw">end</span>
1189
- 202: <span class="ruby-keyword kw">end</span>
1190
- 203:
1191
- 204: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;starting #{scenario} ...&quot;</span>
1192
- 205: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">start</span>
1193
- 206: <span class="ruby-identifier">start_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_i</span>
1194
- 207: <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">true</span>
1195
- 208: <span class="ruby-identifier">sleep</span> <span class="ruby-value">5</span>
1196
- 209: <span class="ruby-identifier">status</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">status</span>
1197
- 210: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>.<span class="ruby-identifier">nil?</span>
1198
- 211: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>[<span class="ruby-value str">&quot;status&quot;</span>].<span class="ruby-identifier">nil?</span>
1199
- 212: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">status</span>[<span class="ruby-value str">&quot;status&quot;</span>][<span class="ruby-value str">&quot;running&quot;</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>
1200
- 213: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;running = #{status[&quot;status&quot;][&quot;running&quot;]}&quot;</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
1201
- 214: <span class="ruby-identifier">r</span> = <span class="ruby-identifier">parse_status</span>(<span class="ruby-identifier">status</span>)
1202
- 215: <span class="ruby-identifier">dump_status</span>(<span class="ruby-identifier">status</span>, <span class="ruby-identifier">musl_file</span>)
1203
- 216: <span class="ruby-keyword kw">return</span>
1204
- 217: <span class="ruby-keyword kw">else</span>
1205
- 218: <span class="ruby-identifier">r</span> = <span class="ruby-identifier">parse_status</span>(<span class="ruby-identifier">status</span>)
1206
- 219: <span class="ruby-keyword kw">end</span>
1207
- 220: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># status['status'].nil? ... no bonafide status was returned</span>
1208
- 221: <span class="ruby-identifier">time_now</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_i</span>
1209
- 222: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">time_now</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">start_time</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">20</span>
1210
- 223: <span class="ruby-comment cmt"># puts &quot;\nError: timing out after 20 seconds. Test had failed to start or verify&quot;</span>
1211
- 224: <span class="ruby-keyword kw">break</span>
1212
- 225: <span class="ruby-keyword kw">end</span>
1213
- 226: <span class="ruby-keyword kw">end</span>
1214
- 227: <span class="ruby-keyword kw">end</span>
1215
- 228: <span class="ruby-keyword kw">end</span>
1216
- 229: <span class="ruby-keyword kw">ensure</span>
1217
- 230: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;stopping #{scenario} ...&quot;</span>
1218
- 231: <span class="ruby-keyword kw">end</span></pre>
1219
- </div>
1220
-
1221
- </div>
1222
-
1223
-
1224
-
1225
-
1226
- </div>
1227
-
1228
-
1229
- <div id="set-hosts-method" class="method-detail ">
1230
- <a name="method-i-set_hosts"></a>
1231
-
1232
- <div class="method-heading">
1233
-
1234
- <span class="method-name">set_hosts</span><span
1235
- class="method-args">(hosts=["b1","b2"])</span>
1236
- <span class="method-click-advice">click to toggle source</span>
1237
-
1238
- </div>
1239
-
1240
- <div class="method-description">
1241
-
1242
- <p>
1243
- expects full strings: e.g. b1/12.89.0.1 &#8230;
1244
- </p>
1245
-
1246
-
1247
-
1248
- <div class="method-source-code"
1249
- id="set-hosts-source">
1250
- <pre>
1251
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 311</span>
1252
- 311: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_hosts</span>(<span class="ruby-identifier">hosts</span>=[<span class="ruby-value str">&quot;b1&quot;</span>,<span class="ruby-value str">&quot;b2&quot;</span>])
1253
- 312: <span class="ruby-identifier">host_params</span> = {}
1254
- 313:
1255
- 314: <span class="ruby-comment cmt"># assign hosts to consecutive string keys, host_0, host_1, etc ...</span>
1256
- 315: <span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>, <span class="ruby-identifier">i</span> <span class="ruby-operator">|</span>
1257
- 316: <span class="ruby-identifier">host_params</span>[<span class="ruby-node">&quot;host_#{i}&quot;</span>] = <span class="ruby-identifier">hosts</span>[<span class="ruby-identifier">i</span>]
1258
- 317: <span class="ruby-keyword kw">end</span>
1259
- 318:
1260
- 319: <span class="ruby-comment cmt"># convert keys to symbols</span>
1261
- 320: <span class="ruby-comment cmt"># host_params.each_key { |k| host_params[k.to_sym] = host_params[k] }</span>
1262
- 321: <span class="ruby-identifier">new_host_params</span> = {}
1263
- 322: <span class="ruby-identifier">host_params</span>.<span class="ruby-identifier">each_key</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">new_host_params</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">host_params</span>[<span class="ruby-identifier">k</span>] }
1264
- 323:
1265
- 324: # add default host, set to host_1 if it exists, unless specified on the command-line if not @hash['default_host'] new_host_params[:default_host] = new_host_params[:host_1] unless new_host_params[:host_1].nil? else new_host_params[:default_host] = @hash['default_host'] end=end
1266
- 325:
1267
- 326: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">&quot;hosts&quot;</span>, <span class="ruby-identifier">new_host_params</span>)
1268
- 327:
1269
- 328: <span class="ruby-keyword kw">end</span></pre>
1270
- </div>
1271
-
1272
- </div>
1273
-
1274
-
1275
-
1276
-
1277
- </div>
1278
-
1279
-
1280
- <div id="set-hosts-byname-method" class="method-detail ">
1281
- <a name="method-i-set_hosts_byname"></a>
1282
-
1283
- <div class="method-heading">
1284
-
1285
- <span class="method-name">set_hosts_byname</span><span
1286
- class="method-args">(hosts=@hosts, count=[1,1], offset=[1,1], v4=true)</span>
1287
- <span class="method-click-advice">click to toggle source</span>
1288
-
1289
- </div>
1290
-
1291
- <div class="method-description">
1292
-
1293
-
1294
-
1295
-
1296
-
1297
- <div class="method-source-code"
1298
- id="set-hosts-byname-source">
1299
- <pre>
1300
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 283</span>
1301
- 283: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_hosts_byname</span>(<span class="ruby-identifier">hosts</span>=<span class="ruby-ivar">@hosts</span>, <span class="ruby-identifier">count</span>=[<span class="ruby-value">1</span>,<span class="ruby-value">1</span>], <span class="ruby-identifier">offset</span>=[<span class="ruby-value">1</span>,<span class="ruby-value">1</span>], <span class="ruby-identifier">v4</span>=<span class="ruby-keyword kw">true</span>)
1302
- 284: <span class="ruby-identifier">new_hosts</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
1303
- 285: <span class="ruby-identifier">str</span> = <span class="ruby-value str">&quot;&quot;</span>
1304
- 286: <span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
1305
- 287: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/^[ab][1-4]$/</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;.&quot;</span>) <span class="ruby-comment cmt"># possible vlan</span>
1306
- 288: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">count</span>[<span class="ruby-identifier">i</span>] <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">count</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">nil?</span>
1307
- 289: <span class="ruby-identifier">str</span> = <span class="ruby-node">&quot;#{n}/*&quot;</span>
1308
- 290: <span class="ruby-keyword kw">else</span>
1309
- 291: <span class="ruby-identifier">str</span> = <span class="ruby-node">&quot;#{n}/*,#{count[i]},#{offset[i]}&quot;</span>
1310
- 292: <span class="ruby-keyword kw">end</span>
1311
- 293: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;using host #{str}&quot;</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
1312
- 294: <span class="ruby-keyword kw">else</span>
1313
- 295: <span class="ruby-ivar">@net</span> = <span class="ruby-constant">Netconfig</span>.<span class="ruby-identifier">new</span>
1314
- 296: <span class="ruby-ivar">@net</span>.<span class="ruby-identifier">setup</span>(<span class="ruby-ivar">@hosts</span>, <span class="ruby-ivar">@username</span>, <span class="ruby-ivar">@password</span>)
1315
- 297: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v4</span>
1316
- 298: <span class="ruby-identifier">addr</span> = <span class="ruby-ivar">@net</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">&quot;hosts/#{n}&quot;</span>)[<span class="ruby-value str">'v4_addr'</span>]
1317
- 299: <span class="ruby-keyword kw">else</span>
1318
- 300: <span class="ruby-identifier">addr</span> = <span class="ruby-ivar">@net</span>.<span class="ruby-identifier">get</span>(<span class="ruby-node">&quot;hosts/#{n}&quot;</span>)[<span class="ruby-value str">'v6_addr'</span>]
1319
- 301: <span class="ruby-keyword kw">end</span>
1320
- 302: <span class="ruby-identifier">str</span> = <span class="ruby-node">&quot;#{addr}&quot;</span>
1321
- 303: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;using host #{str}&quot;</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
1322
- 304: <span class="ruby-keyword kw">end</span>
1323
- 305: <span class="ruby-identifier">new_hosts</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">str</span>
1324
- 306: <span class="ruby-keyword kw">end</span>
1325
- 307: <span class="ruby-identifier">set_hosts</span>(<span class="ruby-identifier">new_hosts</span>)
1326
- 308: <span class="ruby-keyword kw">end</span></pre>
1327
- </div>
1328
-
1329
- </div>
1330
-
1331
-
1332
-
1333
-
1334
- </div>
1335
-
1336
-
1337
- <div id="setup-method" class="method-detail ">
1338
- <a name="method-i-setup"></a>
1339
-
1340
- <div class="method-heading">
1341
-
1342
- <span class="method-name">setup</span><span
1343
- class="method-args">(argv)</span>
1344
- <span class="method-click-advice">click to toggle source</span>
1345
-
1346
- </div>
1347
-
1348
- <div class="method-description">
1349
-
1350
-
1351
-
1352
-
1353
-
1354
- <div class="method-source-code"
1355
- id="setup-source">
1356
- <pre>
1357
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_runscale.rb, line 98</span>
1358
- 98: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
1359
- 99: <span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
1360
- 100: <span class="ruby-ivar">@params</span> = {}
1361
- 101: <span class="ruby-ivar">@peak_concurrency</span> = <span class="ruby-value">0</span>
1362
- 102: <span class="ruby-ivar">@peak_throughput</span> = <span class="ruby-value">0.0</span>
1363
- 103:
1364
- 104: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'test'</span>]
1365
- 105: <span class="ruby-ivar">@verify_only</span> = <span class="ruby-keyword kw">true</span>
1366
- 106: <span class="ruby-keyword kw">else</span>
1367
- 107: <span class="ruby-ivar">@verify_only</span> = <span class="ruby-keyword kw">false</span>
1368
- 108: <span class="ruby-keyword kw">end</span>
1369
- 109:
1370
- 110: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'testset'</span>]
1371
- 111: <span class="ruby-ivar">@testset</span> = <span class="ruby-value str">&quot;&quot;</span>
1372
- 112: <span class="ruby-keyword kw">else</span>
1373
- 113: <span class="ruby-ivar">@testset</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'testset'</span>]
1374
- 114: <span class="ruby-keyword kw">end</span>
1375
- 115:
1376
- 116: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'pattern'</span>]
1377
- 117: <span class="ruby-ivar">@cmd_line_pattern</span> = <span class="ruby-value str">&quot;{ \&quot;iterations\&quot;: 1, \&quot;intervals\&quot;: [ {\&quot;iterations\&quot;:1, \&quot;end\&quot;:100, \&quot;start\&quot;:1, \&quot;duration\&quot;:20 } ] }&quot;</span>
1378
- 118: <span class="ruby-keyword kw">else</span>
1379
- 119: <span class="ruby-ivar">@cmd_line_pattern</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'pattern'</span>]
1380
- 120: <span class="ruby-keyword kw">end</span>
1381
- 121:
1382
- 122: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'interfaces'</span>]
1383
- 123: <span class="ruby-ivar">@cmd_line_hosts</span> = <span class="ruby-value str">&quot;b1,b2&quot;</span>
1384
- 124: <span class="ruby-keyword kw">else</span>
1385
- 125: <span class="ruby-ivar">@cmd_line_hosts</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'interfaces'</span>]
1386
- 126: <span class="ruby-keyword kw">end</span>
1387
- 127:
1388
- 128: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'delay'</span>]
1389
- 129: <span class="ruby-ivar">@delay</span> = <span class="ruby-value">0</span>
1390
- 130: <span class="ruby-keyword kw">else</span>
1391
- 131: <span class="ruby-ivar">@delay</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'delay'</span>].<span class="ruby-identifier">to_i</span>
1392
- 132: <span class="ruby-keyword kw">end</span>
1393
- 133:
1394
- 134: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'no_verify'</span>]
1395
- 135: <span class="ruby-ivar">@no_verify</span> = <span class="ruby-keyword kw">false</span>
1396
- 136: <span class="ruby-keyword kw">else</span>
1397
- 137: <span class="ruby-ivar">@no_verify</span> = <span class="ruby-keyword kw">true</span>
1398
- 138: <span class="ruby-keyword kw">end</span>
1399
- 139:
1400
- 140: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'vector_address_pairing'</span>]
1401
- 141: <span class="ruby-ivar">@vector_address_pairing</span> = <span class="ruby-keyword kw">false</span>
1402
- 142: <span class="ruby-ivar">@limit_concurrency</span> = <span class="ruby-keyword kw">false</span>
1403
- 143: <span class="ruby-keyword kw">else</span>
1404
- 144: <span class="ruby-ivar">@vector_address_pairing</span> = <span class="ruby-keyword kw">true</span>
1405
- 145: <span class="ruby-ivar">@limit_concurrency</span> = <span class="ruby-keyword kw">true</span>
1406
- 146: <span class="ruby-keyword kw">end</span>
1407
- 147:
1408
- 148: if not @hash['hold_concurrency'] @hold_concurrency = false else @hold_concurrency = true end=end
1409
- 149:
1410
- 150: <span class="ruby-keyword kw">end</span></pre>
1411
- </div>
1412
-
1413
- </div>
1414
-
1415
-
1416
-
1417
-
1418
- </div>
1419
-
1420
-
1421
- </div>
1422
-
1423
-
1424
- </div>
1425
-
1426
-
1427
- <div id="rdoc-debugging-section-dump" class="debugging-section">
1428
-
1429
- <p>Disabled; run with --debug to generate this.</p>
1430
-
1431
- </div>
1432
-
1433
- <div id="validator-badges">
1434
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
1435
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
1436
- Rdoc Generator</a> 1.1.6</small>.</p>
1437
- </div>
1438
-
1439
- </body>
1440
- </html>
1441
-