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,1341 +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_appid</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_appid_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
- class="thickbox" title="lib/mu/command/cmd_appid.rb">lib/mu/command/cmd_appid.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-dump_status">#dump_status</a></li>
81
-
82
- <li><a href="#method-i-get_all_hosts_from_musl">#get_all_hosts_from_musl</a></li>
83
-
84
- <li><a href="#method-i-help">#help</a></li>
85
-
86
- <li><a href="#method-i-map_all_hosts_to_json">#map_all_hosts_to_json</a></li>
87
-
88
- <li><a href="#method-i-output_csv">#output_csv</a></li>
89
-
90
- <li><a href="#method-i-parse_cli">#parse_cli</a></li>
91
-
92
- <li><a href="#method-i-parse_status">#parse_status</a></li>
93
-
94
- <li><a href="#method-i-parse_verify_response">#parse_verify_response</a></li>
95
-
96
- <li><a href="#method-i-run">#run</a></li>
97
-
98
- <li><a href="#method-i-set_global_hosts">#set_global_hosts</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_appid</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="hash-attribute-method" class="method-detail">
325
- <a name="hash"></a>
326
-
327
- <a name="hash="></a>
328
-
329
- <div class="method-heading attribute-method-heading">
330
- <span class="method-name">hash</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>
342
-
343
-
344
- <!-- Methods -->
345
-
346
- <div id="public-instance-method-details" class="method-section section">
347
- <h3 class="section-header">Public Instance Methods</h3>
348
-
349
-
350
- <div id="cmd-help-method" class="method-detail ">
351
- <a name="method-i-cmd_help"></a>
352
-
353
- <div class="method-heading">
354
-
355
- <span class="method-name">cmd_help</span><span
356
- class="method-args">(argv)</span>
357
- <span class="method-click-advice">click to toggle source</span>
358
-
359
- </div>
360
-
361
- <div class="method-description">
362
-
363
- <p>
364
- displays command-line help
365
- </p>
366
-
367
-
368
-
369
- <div class="method-source-code"
370
- id="cmd-help-source">
371
- <pre>
372
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 13</span>
373
- 13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_help</span> <span class="ruby-identifier">argv</span>
374
- 14: <span class="ruby-identifier">help</span>
375
- 15: <span class="ruby-keyword kw">end</span></pre>
376
- </div>
377
-
378
- </div>
379
-
380
-
381
-
382
-
383
- </div>
384
-
385
-
386
- <div id="cmd-run-dir-method" class="method-detail ">
387
- <a name="method-i-cmd_run_dir"></a>
388
-
389
- <div class="method-heading">
390
-
391
- <span class="method-name">cmd_run_dir</span><span
392
- class="method-args">(argv)</span>
393
- <span class="method-click-advice">click to toggle source</span>
394
-
395
- </div>
396
-
397
- <div class="method-description">
398
-
399
- <p>
400
- runs through a directory of msl files and executes a Studio <a
401
- href="../Scale.html">Scale</a> test for each one
402
- </p>
403
- <pre>
404
- * argv = command-line arguments, require a directory (-d) argument
405
- * optional -r argument for recursive directory search (default is a flat directory)</pre>
406
-
407
-
408
-
409
- <div class="method-source-code"
410
- id="cmd-run-dir-source">
411
- <pre>
412
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 65</span>
413
- 65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_run_dir</span> <span class="ruby-identifier">argv</span>
414
- 66: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
415
- 67:
416
- 68: <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>]
417
- 69: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;*** Error: directory required, using -d option&quot;</span>
418
- 70: <span class="ruby-keyword kw">else</span>
419
- 71: <span class="ruby-identifier">dir</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'dir'</span>]
420
- 72: <span class="ruby-keyword kw">end</span>
421
- 73:
422
- 74: <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>)
423
- 75: <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>)
424
- 76:
425
- 77: <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>)
426
- 78: <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>)
427
- 79: <span class="ruby-ivar">@params</span> = {}
428
- 80: <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;dir&quot;</span>] = <span class="ruby-identifier">dir</span>
429
- 81: <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;hosts&quot;</span>] = <span class="ruby-ivar">@cmd_line_hosts</span>
430
- 82: <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>])
431
- 83: <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>)
432
- 84: <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>
433
- 85: <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>)
434
- 86: <span class="ruby-keyword kw">else</span>
435
- 87: <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>)
436
- 88: <span class="ruby-keyword kw">end</span>
437
- 89: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">files</span>.<span class="ruby-identifier">empty?</span>
438
- 90: <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>
439
- 91: <span class="ruby-identifier">run</span>(<span class="ruby-identifier">f</span>)
440
- 92: <span class="ruby-identifier">output_csv</span>(<span class="ruby-identifier">f</span>)
441
- 93: <span class="ruby-identifier">sleep</span> <span class="ruby-value">2</span>
442
- 94: <span class="ruby-keyword kw">end</span>
443
- 95: <span class="ruby-keyword kw">else</span>
444
- 96: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;no msl files found in #{dir}&quot;</span>
445
- 97: <span class="ruby-keyword kw">end</span>
446
- 98: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">release</span>
447
- 99: <span class="ruby-keyword kw">end</span></pre>
448
- </div>
449
-
450
- </div>
451
-
452
-
453
-
454
-
455
- </div>
456
-
457
-
458
- <div id="cmd-run-file-method" class="method-detail ">
459
- <a name="method-i-cmd_run_file"></a>
460
-
461
- <div class="method-heading">
462
-
463
- <span class="method-name">cmd_run_file</span><span
464
- class="method-args">(argv)</span>
465
- <span class="method-click-advice">click to toggle source</span>
466
-
467
- </div>
468
-
469
- <div class="method-description">
470
-
471
- <p>
472
- runs a single Studio <a href="../Scale.html">Scale</a> test
473
- </p>
474
- <pre>
475
- * argv = command-line arguments, requires a scenario (-s) argument</pre>
476
-
477
-
478
-
479
- <div class="method-source-code"
480
- id="cmd-run-file-source">
481
- <pre>
482
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 37</span>
483
- 37: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_run_file</span> <span class="ruby-identifier">argv</span>
484
- 38: <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
485
- 39:
486
- 40: <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>]
487
- 41: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;*** Error: scenario required, using -s option&quot;</span>
488
- 42: <span class="ruby-keyword kw">else</span>
489
- 43: <span class="ruby-identifier">scenario</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'scenario'</span>]
490
- 44: <span class="ruby-keyword kw">end</span>
491
- 45:
492
- 46: <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">scenario</span>)
493
- 47: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;*** Error: Scenario file #{scenario} was not found&quot;</span>
494
- 48: <span class="ruby-keyword kw">end</span>
495
- 49:
496
- 50: <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>)
497
- 51: <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>)
498
- 52:
499
- 53: <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>)
500
- 54: <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>)
501
- 55: <span class="ruby-ivar">@params</span> = {}
502
- 56: <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;msl&quot;</span>] = <span class="ruby-identifier">scenario</span>
503
- 57: <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;hosts&quot;</span>] = <span class="ruby-ivar">@cmd_line_hosts</span>
504
- 58: <span class="ruby-identifier">run</span>(<span class="ruby-identifier">scenario</span>)
505
- 59: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">release</span>
506
- 60: <span class="ruby-keyword kw">end</span></pre>
507
- </div>
508
-
509
- </div>
510
-
511
-
512
-
513
-
514
- </div>
515
-
516
-
517
- <div id="cmd-running--method" class="method-detail ">
518
- <a name="method-i-cmd_running%3F"></a>
519
-
520
- <div class="method-heading">
521
-
522
- <span class="method-name">cmd_running?</span><span
523
- class="method-args">(argv)</span>
524
- <span class="method-click-advice">click to toggle source</span>
525
-
526
- </div>
527
-
528
- <div class="method-description">
529
-
530
- <p>
531
- returns a boolean indicating whether the scale test is running or not
532
- </p>
533
- <pre>
534
- * argv = command-line arguments</pre>
535
-
536
-
537
-
538
- <div class="method-source-code"
539
- id="cmd-running--source">
540
- <pre>
541
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 19</span>
542
- 19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cmd_running?</span> <span class="ruby-identifier">argv</span>
543
- 20: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">nil?</span>
544
- 21: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;false&quot;</span>
545
- 22: <span class="ruby-keyword kw">return</span>
546
- 23: <span class="ruby-keyword kw">end</span>
547
- 24:
548
- 25: <span class="ruby-identifier">status</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">status</span>
549
- 26: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>.<span class="ruby-identifier">nil?</span>
550
- 27: <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>
551
- 28: <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>]
552
- 29: <span class="ruby-keyword kw">end</span>
553
- 30: <span class="ruby-keyword kw">else</span>
554
- 31: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;false&quot;</span>
555
- 32: <span class="ruby-keyword kw">end</span>
556
- 33: <span class="ruby-keyword kw">end</span></pre>
557
- </div>
558
-
559
- </div>
560
-
561
-
562
-
563
-
564
- </div>
565
-
566
-
567
- </div>
568
-
569
- <div id="private-instance-method-details" class="method-section section">
570
- <h3 class="section-header">Private Instance Methods</h3>
571
-
572
-
573
- <div id="dump-status-method" class="method-detail ">
574
- <a name="method-i-dump_status"></a>
575
-
576
- <div class="method-heading">
577
-
578
- <span class="method-name">dump_status</span><span
579
- class="method-args">(status, msl)</span>
580
- <span class="method-click-advice">click to toggle source</span>
581
-
582
- </div>
583
-
584
- <div class="method-description">
585
-
586
-
587
-
588
-
589
-
590
- <div class="method-source-code"
591
- id="dump-status-source">
592
- <pre>
593
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 232</span>
594
- 232: <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>)
595
- 233: <span class="ruby-identifier">filename</span> = <span class="ruby-value str">&quot;app_id_status.json&quot;</span>
596
- 234: <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>)
597
- 235: <span class="ruby-identifier">status</span>[<span class="ruby-value str">&quot;filename&quot;</span>] = <span class="ruby-identifier">msl</span>
598
- 236: <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>)
599
- 237: <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>
600
- 238: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">str</span>)
601
- 239: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">close</span>
602
- 240: <span class="ruby-keyword kw">end</span></pre>
603
- </div>
604
-
605
- </div>
606
-
607
-
608
-
609
-
610
- </div>
611
-
612
-
613
- <div id="get-all-hosts-from-musl-method" class="method-detail ">
614
- <a name="method-i-get_all_hosts_from_musl"></a>
615
-
616
- <div class="method-heading">
617
-
618
- <span class="method-name">get_all_hosts_from_musl</span><span
619
- class="method-args">(msl)</span>
620
- <span class="method-click-advice">click to toggle source</span>
621
-
622
- </div>
623
-
624
- <div class="method-description">
625
-
626
- <p>
627
- finds all the hosts in the musl file
628
- </p>
629
-
630
-
631
-
632
- <div class="method-source-code"
633
- id="get-all-hosts-from-musl-source">
634
- <pre>
635
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 249</span>
636
- 249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_all_hosts_from_musl</span>(<span class="ruby-identifier">msl</span>)
637
- 250: <span class="ruby-identifier">f</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">msl</span>)
638
- 251: <span class="ruby-identifier">hosts</span> = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/host_\d+/</span>)
639
- 252: <span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">uniq!</span>
640
- 253: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">hosts</span>
641
- 254: <span class="ruby-keyword kw">end</span></pre>
642
- </div>
643
-
644
- </div>
645
-
646
-
647
-
648
-
649
- </div>
650
-
651
-
652
- <div id="help-method" class="method-detail ">
653
- <a name="method-i-help"></a>
654
-
655
- <div class="method-heading">
656
-
657
- <span class="method-name">help</span><span
658
- class="method-args">()</span>
659
- <span class="method-click-advice">click to toggle source</span>
660
-
661
- </div>
662
-
663
- <div class="method-description">
664
-
665
-
666
-
667
-
668
-
669
- <div class="method-source-code"
670
- id="help-source">
671
- <pre>
672
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 469</span>
673
- 469: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">help</span>
674
- 470: <span class="ruby-identifier">helps</span> = [
675
- 471: { <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> },
676
- 472: { <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 msl files, required for run_dir'</span> },
677
- 473: { <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> },
678
- 474: { <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:0,b2 for ip range and offset'</span> },
679
- 475: { <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> },
680
- 476: { <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> },
681
- 477: { <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> },
682
- 478: { <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> },
683
- 479: { <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 strings, e.g. 1-10000:60,10000-1:30. Duration is in seconds'</span> },
684
- 480: { <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> },
685
- 481: { <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">'msl file, required for run_msl'</span> },
686
- 482: { <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> },
687
- 483: { <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> }
688
- 484: ]
689
- 485:
690
- 486: <span class="ruby-identifier">cmds</span> = [
691
- 487: <span class="ruby-value str">&quot;mu cmd_appid:help&quot;</span>,
692
- 488: <span class="ruby-value str">&quot;mu cmd_appid:run_file -s &lt;file&gt;&quot;</span>,
693
- 489: <span class="ruby-value str">&quot;mu cmd_appid:run_dir -d &lt;dir&gt; [-r]&quot;</span>,
694
- 490: <span class="ruby-value str">&quot;mu cmd_appid:running?&quot;</span>
695
- 491: ]
696
- 492:
697
- 493: <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> }
698
- 494: <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> }
699
- 495: <span class="ruby-identifier">puts</span>
700
- 496: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Usage: mu cmd_appid:&lt;command&gt; &lt;options&gt;&quot;</span>
701
- 497: <span class="ruby-identifier">puts</span>
702
- 498: <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>
703
- 499: <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>]]
704
- 500: <span class="ruby-keyword kw">end</span>
705
- 501: <span class="ruby-identifier">puts</span>
706
- 502: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Available Commands&quot;</span>
707
- 503: <span class="ruby-identifier">puts</span>
708
- 504: <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>
709
- 505: <span class="ruby-identifier">puts</span> <span class="ruby-identifier">c</span>
710
- 506: <span class="ruby-keyword kw">end</span>
711
- 507: <span class="ruby-identifier">puts</span>
712
- 508: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Outputs&quot;</span>
713
- 509: <span class="ruby-identifier">puts</span>
714
- 510: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;app_id_stats.csv&quot;</span>
715
- 511: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;scenario_name , passed , errors , timeouts,&quot;</span>
716
- 512: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;client tx bytes/sec , client tx msgs/sec , client rx bytes/sec , client rx msgs/src,&quot;</span>
717
- 513: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;server tx bytes/sec , server tx msgs/sec , server rx bytes/sec , server rx msgs/src&quot;</span>
718
- 514: <span class="ruby-identifier">puts</span>
719
- 515: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;app_id_status.json&quot;</span>
720
- 516: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;contains the last status json object returned from polling, per scenario&quot;</span>
721
- 517: <span class="ruby-keyword kw">end</span></pre>
722
- </div>
723
-
724
- </div>
725
-
726
-
727
-
728
-
729
- </div>
730
-
731
-
732
- <div id="map-all-hosts-to-json-method" class="method-detail ">
733
- <a name="method-i-map_all_hosts_to_json"></a>
734
-
735
- <div class="method-heading">
736
-
737
- <span class="method-name">map_all_hosts_to_json</span><span
738
- class="method-args">(hosts=[])</span>
739
- <span class="method-click-advice">click to toggle source</span>
740
-
741
- </div>
742
-
743
- <div class="method-description">
744
-
745
- <p>
746
- maps host_0 to the client interface maps all other hosts to the server
747
- interface
748
- </p>
749
-
750
-
751
-
752
- <div class="method-source-code"
753
- id="map-all-hosts-to-json-source">
754
- <pre>
755
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 258</span>
756
- 258: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">map_all_hosts_to_json</span>(<span class="ruby-identifier">hosts</span>=[])
757
- 259: <span class="ruby-identifier">new_hosts</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
758
- 260: <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>
759
- 261: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
760
- 262: <span class="ruby-identifier">new_hosts</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@hosts</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">+</span> <span class="ruby-node">&quot;/*,#{@addr_indexes[0]}&quot;</span>
761
- 263: <span class="ruby-keyword kw">else</span>
762
- 264: <span class="ruby-identifier">new_hosts</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@hosts</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">+</span> <span class="ruby-node">&quot;/*,#{@addr_indexes[1]}&quot;</span>
763
- 265: <span class="ruby-keyword kw">end</span>
764
- 266: <span class="ruby-keyword kw">end</span>
765
- 267:
766
- 268: <span class="ruby-identifier">hosts_config</span> = {}
767
- 269:
768
- 270: <span class="ruby-comment cmt"># assign hosts to consecutive string keys, host_0, host_1, etc ...</span>
769
- 271: <span class="ruby-identifier">new_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>
770
- 272: <span class="ruby-identifier">hosts_config</span>[<span class="ruby-node">&quot;host_#{i}&quot;</span>] = <span class="ruby-identifier">h</span> <span class="ruby-comment cmt"># new_hosts[i]</span>
771
- 273: <span class="ruby-keyword kw">end</span>
772
- 274:
773
- 275: <span class="ruby-comment cmt"># convert keys to symbols</span>
774
- 276: <span class="ruby-identifier">new_hosts_config</span> = {}
775
- 277: <span class="ruby-identifier">hosts_config</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_hosts_config</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">hosts_config</span>[<span class="ruby-identifier">k</span>] }
776
- 278:
777
- 279: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">new_hosts_config</span>
778
- 280: <span class="ruby-keyword kw">end</span></pre>
779
- </div>
780
-
781
- </div>
782
-
783
-
784
-
785
-
786
- </div>
787
-
788
-
789
- <div id="output-csv-method" class="method-detail ">
790
- <a name="method-i-output_csv"></a>
791
-
792
- <div class="method-heading">
793
-
794
- <span class="method-name">output_csv</span><span
795
- class="method-args">(msl_file)</span>
796
- <span class="method-click-advice">click to toggle source</span>
797
-
798
- </div>
799
-
800
- <div class="method-description">
801
-
802
-
803
-
804
-
805
-
806
- <div class="method-source-code"
807
- id="output-csv-source">
808
- <pre>
809
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 242</span>
810
- 242: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output_csv</span>(<span class="ruby-identifier">msl_file</span>)
811
- 243: <span class="ruby-identifier">filename</span> = <span class="ruby-value str">&quot;app_id_stats.csv&quot;</span>
812
- 244: <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>
813
- 245: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">RDWR</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">TRUNC</span><span class="ruby-operator">|</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">CREAT</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>) }
814
- 246: <span class="ruby-keyword kw">end</span></pre>
815
- </div>
816
-
817
- </div>
818
-
819
-
820
-
821
-
822
- </div>
823
-
824
-
825
- <div id="parse-cli-method" class="method-detail ">
826
- <a name="method-i-parse_cli"></a>
827
-
828
- <div class="method-heading">
829
-
830
- <span class="method-name">parse_cli</span><span
831
- class="method-args">(argv)</span>
832
- <span class="method-click-advice">click to toggle source</span>
833
-
834
- </div>
835
-
836
- <div class="method-description">
837
-
838
-
839
-
840
-
841
-
842
- <div class="method-source-code"
843
- id="parse-cli-source">
844
- <pre>
845
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 369</span>
846
- 369: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
847
- 370: <span class="ruby-ivar">@hash</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
848
- 371: <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>
849
- 372: <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>
850
- 373:
851
- 374: <span class="ruby-identifier">k</span> = <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">shift</span>
852
- 375:
853
- 376: <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>
854
- 377: <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>)
855
- 378: <span class="ruby-keyword kw">next</span>
856
- 379: <span class="ruby-keyword kw">end</span>
857
- 380:
858
- 381: <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>
859
- 382: <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>)
860
- 383: <span class="ruby-keyword kw">next</span>
861
- 384: <span class="ruby-keyword kw">end</span>
862
- 385:
863
- 386: <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>
864
- 387: <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>)
865
- 388: <span class="ruby-keyword kw">next</span>
866
- 389: <span class="ruby-keyword kw">end</span>
867
- 390:
868
- 391: <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>
869
- 392: <span class="ruby-identifier">help</span>
870
- 393: <span class="ruby-identifier">exit</span>
871
- 394: <span class="ruby-keyword kw">end</span>
872
- 395:
873
- 396: <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>
874
- 397: <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>)
875
- 398: <span class="ruby-keyword kw">next</span>
876
- 399: <span class="ruby-keyword kw">end</span>
877
- 400:
878
- 401: <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>
879
- 402: <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>)
880
- 403: <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>
881
- 404: <span class="ruby-identifier">@@mu_admin_user</span> = <span class="ruby-node">$1</span>
882
- 405: <span class="ruby-identifier">@@mu_admin_pass</span> = <span class="ruby-node">$2</span>
883
- 406: <span class="ruby-identifier">@@mu_ip</span> = <span class="ruby-node">$3</span>
884
- 407: <span class="ruby-keyword kw">end</span>
885
- 408: <span class="ruby-keyword kw">next</span>
886
- 409: <span class="ruby-keyword kw">end</span>
887
- 410:
888
- 411: <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>
889
- 412: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'no_verify'</span>] = <span class="ruby-keyword kw">true</span>
890
- 413: <span class="ruby-keyword kw">next</span>
891
- 414: <span class="ruby-keyword kw">end</span>
892
- 415:
893
- 416: <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>
894
- 417: <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>)
895
- 418: <span class="ruby-keyword kw">next</span>
896
- 419: <span class="ruby-keyword kw">end</span>
897
- 420:
898
- 421: <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>
899
- 422: <span class="ruby-identifier">patterns</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
900
- 423: <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>)
901
- 424: <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>)
902
- 425: <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>
903
- 426: <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>
904
- 427: <span class="ruby-identifier">start_vol</span> = <span class="ruby-node">$1</span>
905
- 428: <span class="ruby-identifier">end_vol</span> = <span class="ruby-node">$2</span>
906
- 429: <span class="ruby-identifier">duration</span> = <span class="ruby-node">$3</span>
907
- 430: <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>
908
- 431: <span class="ruby-keyword kw">end</span>
909
- 432: <span class="ruby-keyword kw">end</span>
910
- 433: <span class="ruby-identifier">ps</span> = <span class="ruby-value str">&quot;{ \&quot;iterations\&quot;: 1, \&quot;intervals\&quot;: [&quot;</span>
911
- 434: <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>
912
- 435: <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>
913
- 436: <span class="ruby-keyword kw">end</span>
914
- 437: <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>
915
- 438: <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>
916
- 439: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'pattern'</span>] = <span class="ruby-identifier">ps</span>
917
- 440: <span class="ruby-keyword kw">next</span>
918
- 441: <span class="ruby-keyword kw">end</span>
919
- 442:
920
- 443: <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>
921
- 444: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'recursive'</span>] = <span class="ruby-keyword kw">true</span>
922
- 445: <span class="ruby-keyword kw">next</span>
923
- 446: <span class="ruby-keyword kw">end</span>
924
- 447:
925
- 448: <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>
926
- 449: <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>)
927
- 450: <span class="ruby-keyword kw">next</span>
928
- 451: <span class="ruby-keyword kw">end</span>
929
- 452:
930
- 453: <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>
931
- 454: <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'test'</span>] = <span class="ruby-keyword kw">true</span>
932
- 455: <span class="ruby-keyword kw">next</span>
933
- 456: <span class="ruby-keyword kw">end</span>
934
- 457:
935
- 458: <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>
936
- 459: <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>
937
- 460: <span class="ruby-keyword kw">next</span>
938
- 461: <span class="ruby-keyword kw">end</span>
939
- 462:
940
- 463: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;Unknown option #{k}&quot;</span>
941
- 464: <span class="ruby-keyword kw">end</span>
942
- 465:
943
- 466: <span class="ruby-identifier">hash</span>
944
- 467: <span class="ruby-keyword kw">end</span></pre>
945
- </div>
946
-
947
- </div>
948
-
949
-
950
-
951
-
952
- </div>
953
-
954
-
955
- <div id="parse-status-method" class="method-detail ">
956
- <a name="method-i-parse_status"></a>
957
-
958
- <div class="method-heading">
959
-
960
- <span class="method-name">parse_status</span><span
961
- class="method-args">(status)</span>
962
- <span class="method-click-advice">click to toggle source</span>
963
-
964
- </div>
965
-
966
- <div class="method-description">
967
-
968
-
969
-
970
-
971
-
972
- <div class="method-source-code"
973
- id="parse-status-source">
974
- <pre>
975
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 306</span>
976
- 306: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_status</span>(<span class="ruby-identifier">status</span>)
977
- 307: <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>
978
- 308: <span class="ruby-identifier">msg</span> <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">pretty_generate</span>(<span class="ruby-identifier">status</span>), <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
979
- 309: <span class="ruby-ivar">@reported_volume</span> = <span class="ruby-value">0</span>
980
- 310: <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>
981
- 311: <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>
982
- 312: <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>]
983
- 313: <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>]
984
- 314: <span class="ruby-comment cmt"># puts &quot;*** Error = #{@error}, reason = #{@reason} ***\n\n&quot;</span>
985
- 315: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
986
- 316: <span class="ruby-keyword kw">end</span>
987
- 317: <span class="ruby-keyword kw">end</span>
988
- 318:
989
- 319: <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>]
990
- 320: <span class="ruby-ivar">@duration</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">&quot;duration&quot;</span>]
991
- 321: <span class="ruby-ivar">@instances</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">&quot;instances&quot;</span>]
992
- 322: <span class="ruby-ivar">@total_instances</span> = <span class="ruby-ivar">@instances</span>[<span class="ruby-value str">&quot;total&quot;</span>]
993
- 323: <span class="ruby-ivar">@executed</span> = <span class="ruby-ivar">@instances</span>[<span class="ruby-value str">&quot;executed&quot;</span>]
994
- 324: <span class="ruby-ivar">@timeouts</span> = <span class="ruby-ivar">@instances</span>[<span class="ruby-value str">&quot;timeouts&quot;</span>]
995
- 325: <span class="ruby-ivar">@errors</span> = <span class="ruby-ivar">@instances</span>[<span class="ruby-value str">&quot;errors&quot;</span>]
996
- 326: <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>]
997
- 327: <span class="ruby-ivar">@server</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">&quot;server&quot;</span>]
998
- 328: <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>]
999
- 329: <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>]
1000
- 330: <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>]
1001
- 331: <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>]
1002
- 332: <span class="ruby-ivar">@client</span> = <span class="ruby-ivar">@stats_summary</span>[<span class="ruby-value str">&quot;client&quot;</span>]
1003
- 333: <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>]
1004
- 334: <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>]
1005
- 335: <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>]
1006
- 336: <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>]
1007
- 337: <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>]
1008
- 338: <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>
1009
- 339: <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>]
1010
- 340: <span class="ruby-keyword kw">end</span>
1011
- 341:
1012
- 342: <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>
1013
- 343: <span class="ruby-identifier">dur1</span> = <span class="ruby-ivar">@duration</span>.<span class="ruby-identifier">to_f</span>
1014
- 344: <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>)
1015
- 345:
1016
- 346: <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>
1017
- 347: <span class="ruby-ivar">@peak_throughput</span> = <span class="ruby-identifier">thruput</span>.<span class="ruby-identifier">to_f</span>
1018
- 348: <span class="ruby-keyword kw">end</span>
1019
- 349:
1020
- 350: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;&quot;</span>
1021
- 351: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;duration: #{format_float(2, @duration)}&quot;</span>
1022
- 352: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;concurrency: #{@reported_volume}&quot;</span>
1023
- 353: <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>
1024
- 354: <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>
1025
- 355: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;passed: #{@executed}&quot;</span>
1026
- 356: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;errors: #{@errors}&quot;</span>
1027
- 357: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;timeouts: #{@timeouts}&quot;</span>
1028
- 358: <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>
1029
- 359: <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>
1030
- 360: <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>
1031
- 361: <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>
1032
- 362: <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>
1033
- 363: <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>
1034
- 364: <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>
1035
- 365: <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>
1036
- 366: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;&quot;</span>
1037
- 367: <span class="ruby-keyword kw">end</span></pre>
1038
- </div>
1039
-
1040
- </div>
1041
-
1042
-
1043
-
1044
-
1045
- </div>
1046
-
1047
-
1048
- <div id="parse-verify-response-method" class="method-detail ">
1049
- <a name="method-i-parse_verify_response"></a>
1050
-
1051
- <div class="method-heading">
1052
-
1053
- <span class="method-name">parse_verify_response</span><span
1054
- class="method-args">(response)</span>
1055
- <span class="method-click-advice">click to toggle source</span>
1056
-
1057
- </div>
1058
-
1059
- <div class="method-description">
1060
-
1061
-
1062
-
1063
-
1064
-
1065
- <div class="method-source-code"
1066
- id="parse-verify-response-source">
1067
- <pre>
1068
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 282</span>
1069
- 282: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_verify_response</span>(<span class="ruby-identifier">response</span>)
1070
- 283: <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>
1071
- 284: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;*** error = no response received from /verify ***\n\n&quot;</span>
1072
- 285: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
1073
- 286: <span class="ruby-keyword kw">end</span>
1074
- 287: <span class="ruby-keyword kw">begin</span>
1075
- 288: <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>
1076
- 289: <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>
1077
- 290: <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>
1078
- 291: <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>]
1079
- 292: <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>]
1080
- 293: <span class="ruby-identifier">dump_status</span>(<span class="ruby-identifier">response</span>)
1081
- 294: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;*** Error = #{@error}, reason = #{@reason} ***\n\n&quot;</span>
1082
- 295: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
1083
- 296: <span class="ruby-keyword kw">end</span>
1084
- 297: <span class="ruby-keyword kw">end</span>
1085
- 298: <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>
1086
- 299: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;*** verify: okay ***&quot;</span>
1087
- 300: <span class="ruby-keyword kw">rescue</span>
1088
- 301: <span class="ruby-comment cmt"># could nbe json parse error</span>
1089
- 302: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
1090
- 303: <span class="ruby-keyword kw">end</span>
1091
- 304: <span class="ruby-keyword kw">end</span></pre>
1092
- </div>
1093
-
1094
- </div>
1095
-
1096
-
1097
-
1098
-
1099
- </div>
1100
-
1101
-
1102
- <div id="run-method" class="method-detail ">
1103
- <a name="method-i-run"></a>
1104
-
1105
- <div class="method-heading">
1106
-
1107
- <span class="method-name">run</span><span
1108
- class="method-args">(msl)</span>
1109
- <span class="method-click-advice">click to toggle source</span>
1110
-
1111
- </div>
1112
-
1113
- <div class="method-description">
1114
-
1115
-
1116
-
1117
-
1118
-
1119
- <div class="method-source-code"
1120
- id="run-source">
1121
- <pre>
1122
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 146</span>
1123
- 146: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">msl</span>)
1124
- 147: <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">msl</span>)
1125
- 148: <span class="ruby-keyword kw">return</span> <span class="ruby-node">&quot;file not found: #{msl}&quot;</span>
1126
- 149: <span class="ruby-keyword kw">end</span>
1127
- 150:
1128
- 151: <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">msl</span>))
1129
- 152:
1130
- 153: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@testset</span>.<span class="ruby-identifier">empty?</span>
1131
- 154: <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>) <span class="ruby-comment cmt"># assume it is the full path in this case</span>
1132
- 155: <span class="ruby-identifier">csv_file</span> = <span class="ruby-ivar">@testset</span>
1133
- 156: <span class="ruby-keyword kw">else</span>
1134
- 157: <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>
1135
- 158: <span class="ruby-keyword kw">end</span>
1136
- 159: <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>))
1137
- 160: <span class="ruby-keyword kw">end</span>
1138
- 161:
1139
- 162: <span class="ruby-identifier">set_global_hosts</span>
1140
- 163: <span class="ruby-identifier">all_hosts</span> = <span class="ruby-identifier">get_all_hosts_from_musl</span>(<span class="ruby-identifier">msl</span>)
1141
- 164: <span class="ruby-ivar">@hosts_config</span> = <span class="ruby-identifier">map_all_hosts_to_json</span>(<span class="ruby-identifier">all_hosts</span>)
1142
- 165: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">configure</span>(<span class="ruby-value str">&quot;hosts&quot;</span>, <span class="ruby-ivar">@hosts_config</span>)
1143
- 166: <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>)
1144
- 167: <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>
1145
- 168: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;verifying #{msl} ...&quot;</span>
1146
- 169: <span class="ruby-identifier">response</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">verify</span>
1147
- 170: <span class="ruby-comment cmt"># sleep 3</span>
1148
- 171: <span class="ruby-identifier">v</span> = <span class="ruby-identifier">parse_verify_response</span>(<span class="ruby-identifier">response</span>)
1149
- 172: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">nil?</span>
1150
- 173: <span class="ruby-identifier">msg</span> <span class="ruby-value str">&quot;error in verify&quot;</span>
1151
- 174: <span class="ruby-keyword kw">return</span>
1152
- 175: <span class="ruby-keyword kw">end</span>
1153
- 176: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@verify_only</span>
1154
- 177: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">v</span>
1155
- 178: <span class="ruby-keyword kw">return</span>
1156
- 179: <span class="ruby-keyword kw">end</span>
1157
- 180: <span class="ruby-keyword kw">end</span>
1158
- 181: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;starting #{msl} ...&quot;</span>
1159
- 182: <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">start</span>
1160
- 183: <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>
1161
- 184: <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">true</span>
1162
- 185: <span class="ruby-identifier">sleep</span> <span class="ruby-value">5</span>
1163
- 186: <span class="ruby-identifier">status</span> = <span class="ruby-ivar">@api</span>.<span class="ruby-identifier">status</span>
1164
- 187: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">status</span>.<span class="ruby-identifier">nil?</span>
1165
- 188: <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>
1166
- 189: <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>
1167
- 190: <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>
1168
- 191: <span class="ruby-identifier">r</span> = <span class="ruby-identifier">parse_status</span>(<span class="ruby-identifier">status</span>)
1169
- 192: <span class="ruby-identifier">dump_status</span>(<span class="ruby-identifier">status</span>, <span class="ruby-identifier">msl</span>)
1170
- 193: <span class="ruby-keyword kw">return</span>
1171
- 194: <span class="ruby-keyword kw">else</span>
1172
- 195: <span class="ruby-identifier">r</span> = <span class="ruby-identifier">parse_status</span>(<span class="ruby-identifier">status</span>)
1173
- 196: <span class="ruby-keyword kw">end</span>
1174
- 197: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># status['status'].nil? ... no bonafide status was returned</span>
1175
- 198: <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>
1176
- 199: <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>
1177
- 200: <span class="ruby-comment cmt"># puts &quot;\nError: timing out after 20 seconds. Test had failed to start or verify&quot;</span>
1178
- 201: <span class="ruby-keyword kw">break</span>
1179
- 202: <span class="ruby-keyword kw">end</span>
1180
- 203: <span class="ruby-keyword kw">end</span>
1181
- 204: <span class="ruby-keyword kw">end</span>
1182
- 205: <span class="ruby-keyword kw">end</span>
1183
- 206: <span class="ruby-keyword kw">ensure</span>
1184
- 207: <span class="ruby-identifier">msg</span> <span class="ruby-node">&quot;stopping #{msl} ...&quot;</span>
1185
- 208: <span class="ruby-keyword kw">end</span></pre>
1186
- </div>
1187
-
1188
- </div>
1189
-
1190
-
1191
-
1192
-
1193
- </div>
1194
-
1195
-
1196
- <div id="set-global-hosts-method" class="method-detail ">
1197
- <a name="method-i-set_global_hosts"></a>
1198
-
1199
- <div class="method-heading">
1200
-
1201
- <span class="method-name">set_global_hosts</span><span
1202
- class="method-args">()</span>
1203
- <span class="method-click-advice">click to toggle source</span>
1204
-
1205
- </div>
1206
-
1207
- <div class="method-description">
1208
-
1209
-
1210
-
1211
-
1212
-
1213
- <div class="method-source-code"
1214
- id="set-global-hosts-source">
1215
- <pre>
1216
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 210</span>
1217
- 210: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_global_hosts</span>
1218
- 211: <span class="ruby-ivar">@hosts</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
1219
- 212: <span class="ruby-ivar">@addr_indexes</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
1220
- 213: <span class="ruby-identifier">hosts</span> = <span class="ruby-ivar">@params</span>[<span class="ruby-value str">&quot;hosts&quot;</span>]
1221
- 214: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">nil?</span>
1222
- 215: <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>)
1223
- 216: <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>
1224
- 217: <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>
1225
- 218: <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>)
1226
- 219: <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>]
1227
- 220: <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>]
1228
- 221: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># default to the 1st addr index</span>
1229
- 222: <span class="ruby-ivar">@hosts</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">h</span>
1230
- 223: <span class="ruby-ivar">@addr_indexes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value">1</span>
1231
- 224: <span class="ruby-keyword kw">end</span>
1232
- 225: <span class="ruby-keyword kw">end</span>
1233
- 226: <span class="ruby-keyword kw">else</span>
1234
- 227: <span class="ruby-ivar">@hosts</span> = [<span class="ruby-value str">'b1'</span>,<span class="ruby-value str">'b2'</span>]
1235
- 228: <span class="ruby-ivar">@addr_indexes</span> = [<span class="ruby-value">1</span>,<span class="ruby-value">1</span>]
1236
- 229: <span class="ruby-keyword kw">end</span>
1237
- 230: <span class="ruby-keyword kw">end</span></pre>
1238
- </div>
1239
-
1240
- </div>
1241
-
1242
-
1243
-
1244
-
1245
- </div>
1246
-
1247
-
1248
- <div id="setup-method" class="method-detail ">
1249
- <a name="method-i-setup"></a>
1250
-
1251
- <div class="method-heading">
1252
-
1253
- <span class="method-name">setup</span><span
1254
- class="method-args">(argv)</span>
1255
- <span class="method-click-advice">click to toggle source</span>
1256
-
1257
- </div>
1258
-
1259
- <div class="method-description">
1260
-
1261
-
1262
-
1263
-
1264
-
1265
- <div class="method-source-code"
1266
- id="setup-source">
1267
- <pre>
1268
- <span class="ruby-comment cmt"># File lib/mu/command/cmd_appid.rb, line 103</span>
1269
- 103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span> <span class="ruby-identifier">argv</span>
1270
- 104: <span class="ruby-identifier">parse_cli</span> <span class="ruby-identifier">argv</span>
1271
- 105: <span class="ruby-ivar">@params</span> = {}
1272
- 106: <span class="ruby-ivar">@peak_throughput</span> = <span class="ruby-value">0.0</span>
1273
- 107:
1274
- 108: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'test'</span>]
1275
- 109: <span class="ruby-ivar">@verify_only</span> = <span class="ruby-keyword kw">true</span>
1276
- 110: <span class="ruby-keyword kw">else</span>
1277
- 111: <span class="ruby-ivar">@verify_only</span> = <span class="ruby-keyword kw">false</span>
1278
- 112: <span class="ruby-keyword kw">end</span>
1279
- 113:
1280
- 114: <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>]
1281
- 115: <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>
1282
- 116: <span class="ruby-keyword kw">else</span>
1283
- 117: <span class="ruby-ivar">@cmd_line_pattern</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'pattern'</span>]
1284
- 118: <span class="ruby-keyword kw">end</span>
1285
- 119:
1286
- 120: <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>]
1287
- 121: <span class="ruby-ivar">@cmd_line_hosts</span> = <span class="ruby-value str">&quot;b1,b2&quot;</span>
1288
- 122: <span class="ruby-keyword kw">else</span>
1289
- 123: <span class="ruby-ivar">@cmd_line_hosts</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'interfaces'</span>]
1290
- 124: <span class="ruby-keyword kw">end</span>
1291
- 125:
1292
- 126: <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>]
1293
- 127: <span class="ruby-ivar">@testset</span> = <span class="ruby-value str">&quot;&quot;</span>
1294
- 128: <span class="ruby-keyword kw">else</span>
1295
- 129: <span class="ruby-ivar">@testset</span> = <span class="ruby-ivar">@hash</span>[<span class="ruby-value str">'testset'</span>]
1296
- 130: <span class="ruby-keyword kw">end</span>
1297
- 131:
1298
- 132: <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>]
1299
- 133: <span class="ruby-ivar">@delay</span> = <span class="ruby-value">0</span>
1300
- 134: <span class="ruby-keyword kw">else</span>
1301
- 135: <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>
1302
- 136: <span class="ruby-keyword kw">end</span>
1303
- 137:
1304
- 138: <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>]
1305
- 139: <span class="ruby-ivar">@no_verify</span> = <span class="ruby-keyword kw">false</span>
1306
- 140: <span class="ruby-keyword kw">else</span>
1307
- 141: <span class="ruby-ivar">@no_verify</span> = <span class="ruby-keyword kw">true</span>
1308
- 142: <span class="ruby-keyword kw">end</span>
1309
- 143:
1310
- 144: <span class="ruby-keyword kw">end</span></pre>
1311
- </div>
1312
-
1313
- </div>
1314
-
1315
-
1316
-
1317
-
1318
- </div>
1319
-
1320
-
1321
- </div>
1322
-
1323
-
1324
- </div>
1325
-
1326
-
1327
- <div id="rdoc-debugging-section-dump" class="debugging-section">
1328
-
1329
- <p>Disabled; run with --debug to generate this.</p>
1330
-
1331
- </div>
1332
-
1333
- <div id="validator-badges">
1334
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
1335
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
1336
- Rdoc Generator</a> 1.1.6</small>.</p>
1337
- </div>
1338
-
1339
- </body>
1340
- </html>
1341
-