Changeset 16894 for trunk/Ohana/src/opihi/cmd.basic/test/if.sh
- Timestamp:
- Mar 8, 2008, 11:30:10 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.basic/test/if.sh (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.basic/test/if.sh
r14176 r16894 13 13 test11 14 14 test12 15 test13a 15 16 test13 16 #test1417 test14 17 18 end 18 19 … … 201 202 end 202 203 204 205 # check memleaks 206 macro test13a 207 208 local a b i N 209 210 list word -x "ps -p $PID -o rss" 211 $startmem = $word:1 212 213 output /dev/null 214 $a = 1 215 for i 0 1000 216 if ($a == 1) 217 echo "run" 218 end 219 end 220 output stdout 221 222 list word -x "ps -p $PID -o rss" 223 $endmem = $word:1 224 225 if ({$endmem - $startmem} < 10) 226 $PASS = 1 227 else 228 $PASS = 0 229 echo "growth: {$endmem-$startmem}" 230 echo "kB/loop: {($endmem-$startmem)/1000}" 231 end 232 end 203 233 204 234 # check memleaks … … 213 243 $a = 1 214 244 $b = 2 215 for i 0 1000 0245 for i 0 1000 216 246 if (($a == 1) && ($b == 2)) 217 247 echo "run" … … 228 258 $PASS = 0 229 259 echo "growth: {$endmem-$startmem}" 230 echo "kB/loop: {($endmem-$startmem)/1000 0}"231 end 232 end 233 234 # memory test using break260 echo "kB/loop: {($endmem-$startmem)/1000}" 261 end 262 end 263 264 # memory test using continue 235 265 macro test14 236 266 … … 243 273 $a = 1 244 274 $b = 2 245 for i 0 1000 0275 for i 0 1000 246 276 if (($a == 1) && ($b == 2)) 247 break277 continue 248 278 echo "run" 249 279 end … … 259 289 $PASS = 0 260 290 echo "growth: {$endmem-$startmem}" 261 echo "kB/loop: {($endmem-$startmem)/10000}" 262 end 263 end 291 echo "kB/loop: {($endmem-$startmem)/1000}" 292 end 293 end 294 295 # memory test using continue 296 macro test15 297 298 local a b i N bool 299 300 list word -x "ps -p $PID -o rss" 301 $startmem = $word:1 302 303 output /dev/null 304 $a = 1 305 $b = 2 306 for i 0 1000 307 $bool = (($a == 1) && ($b == 2)) 308 end 309 output stdout 310 311 list word -x "ps -p $PID -o rss" 312 $endmem = $word:1 313 314 if ({$endmem - $startmem} < 10) 315 $PASS = 1 316 else 317 $PASS = 0 318 echo "growth: {$endmem-$startmem}" 319 echo "kB/loop: {($endmem-$startmem)/1000}" 320 end 321 end
Note:
See TracChangeset
for help on using the changeset viewer.
