Changeset 14176 for trunk/Ohana/src/opihi/cmd.data
- Timestamp:
- Jul 12, 2007, 2:26:24 PM (19 years ago)
- Location:
- trunk/Ohana/src/opihi/cmd.data/test
- Files:
-
- 8 added
- 3 edited
-
applyfit.sh (added)
-
concat.sh (added)
-
create.sh (added)
-
cumulative.sh (added)
-
delete.sh (added)
-
fit2d.sh (added)
-
integrate.sh (added)
-
interpolate.sh (added)
-
peak.sh (modified) (2 diffs)
-
periodogram.sh (modified) (2 diffs)
-
queues.sh (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.data/test/peak.sh
r9197 r14176 4 4 test2 5 5 test3 6 test4 7 test5 6 testmem1 8 7 end 9 8 … … 77 76 78 77 # test memory usage 79 macro test4 80 $PASS = 1 78 macro testmem1 81 79 break -auto off 82 80 83 create x 0 100 81 create x 0 1000 84 82 set y = zero (x) 85 y[60] = 2 86 y[50] = 1 87 y[40] = 2 83 y[500] = 100 88 84 89 echo "peak:" 90 exec ps aux | grep mana | grep -v grep 91 for i 0 100000 92 peak -q x y 45 55 85 list word -x "ps -p $PID -o rss" 86 $startmem = $word:1 87 88 for i 0 10000 89 peak -q x y 400 600 93 90 end 94 exec ps aux | grep mana | grep -v grep 91 92 list word -x "ps -p $PID -o rss" 93 $endmem = $word:1 95 94 96 ## HOW do we test this? 95 if ({$endmem - $startmem} < 10) 96 $PASS = 1 97 else 98 $PASS = 0 99 echo "growth: {$endmem-$startmem}" 100 echo "kB/loop: {($endmem-$startmem)/10000}" 101 end 102 97 103 end 98 99 # test memory usage100 macro test5101 $PASS = 1102 break -auto off103 104 create x 0 100105 set y = zero (x)106 y[60] = 2107 y[50] = 1108 y[40] = 2109 110 echo "peak:"111 exec ps aux | grep mana | grep -v grep112 for i 0 1000113 peak x y 45 55114 end115 exec ps aux | grep mana | grep -v grep116 117 ## HOW do we test this?118 end119 -
trunk/Ohana/src/opihi/cmd.data/test/periodogram.sh
r6642 r14176 23 23 if (abs ($peakpos - $P) > 0.5) 24 24 $PASS = 0 25 echo "OFFSET: {$peakpos - $P}" 25 26 end 26 27 end … … 90 91 periodogram t f 2 30 period power 91 92 92 lim -n 0 t f; clear; box; plot -x 2 -pt 2 t f93 lim -n 1 period power; clear; box; plot period power93 # lim -n 0 t f; clear; box; plot -x 2 -pt 2 t f 94 # lim -n 1 period power; clear; box; plot period power 94 95 95 96 peak -q period power -
trunk/Ohana/src/opihi/cmd.data/test/queues.sh
r9359 r14176 21 21 # test queueinit 22 22 macro test1 23 23 $PASS = 1 24 24 queueinit dummy 25 25 queuesize dummy -var N … … 30 30 end 31 31 32 # test queueinit 32 # test queueinit memory 33 33 macro testmem1 34 34 $PASS = 1 35 35 list word -x "ps -p $PID -o rss" 36 36 $startmem = $word:1 … … 54 54 # test queuesize 55 55 macro test2 56 56 $PASS = 1 57 57 queueinit dummy 58 58 queuepush dummy foobar … … 64 64 end 65 65 66 # test queuesize 66 # test queuesize memory 67 67 macro testmem2 68 68 $PASS = 1 69 69 queueinit dummy 70 70 queuepush dummy foobar … … 91 91 # test queuedelete 92 92 macro test3 93 93 $PASS = 1 94 94 queueinit dummy 95 95 queuepush dummy foobar … … 106 106 end 107 107 108 # test queuedelete 108 # test queuedelete memory 109 109 macro testmem3 110 110 $PASS = 1 111 111 list word -x "ps -p $PID -o rss" 112 112 $startmem = $word:1 … … 132 132 # test queuepush / queuepop 133 133 macro test4 134 134 $PASS = 1 135 135 queueinit dummy 136 136 queuepush dummy foobar … … 144 144 # test queuepush / queuepop 145 145 macro test4.1 146 146 $PASS = 1 147 147 queueinit dummy 148 148 queuepush dummy foo1 … … 168 168 end 169 169 170 # test queue delete170 # test queuepush / queuepop memory 171 171 macro testmem4.0 172 172 $PASS = 1 173 173 list word -x "ps -p $PID -o rss" 174 174 $startmem = $word:1 … … 192 192 end 193 193 194 # test queue delete194 # test queuepush / queuepop memory 195 195 macro testmem4.1 196 196 $PASS = 1 197 197 list word -x "ps -p $PID -o rss" 198 198 $startmem = $word:1 … … 216 216 end 217 217 218 # test queue delete218 # test queuepush / queuepop memory 219 219 macro testmem4.2 220 221 list word -x "ps -p $PID -o rss" 222 $startmem = $word:1 223 224 output /dev/null 225 for i 0 10000 226 queueinit dummy 227 queuepush dummy foobar 228 end 229 output stdout 230 231 list word -x "ps -p $PID -o rss" 232 $endmem = $word:1 233 234 if ({$endmem - $startmem} > 10) 235 $PASS = 0 236 echo "growth: {$endmem-$startmem}" 237 echo "kB/loop: {($endmem-$startmem)/10000}" 238 end 239 end 240 241 # test queue delete220 $PASS = 1 221 list word -x "ps -p $PID -o rss" 222 $startmem = $word:1 223 224 output /dev/null 225 for i 0 10000 226 queueinit dummy 227 queuepush dummy foobar 228 end 229 output stdout 230 231 list word -x "ps -p $PID -o rss" 232 $endmem = $word:1 233 234 if ({$endmem - $startmem} > 10) 235 $PASS = 0 236 echo "growth: {$endmem-$startmem}" 237 echo "kB/loop: {($endmem-$startmem)/10000}" 238 end 239 end 240 241 # test queuepush / queuepop memory 242 242 macro testmem4.3 243 243 $PASS = 1 244 244 list word -x "ps -p $PID -o rss" 245 245 $startmem = $word:1 … … 266 266 # test queuepush / queuepop with keys 267 267 macro test5 268 268 $PASS = 1 269 269 queueinit dummy 270 270 queuepush dummy "test 1 word" … … 278 278 end 279 279 280 # test queuepush / queuepop 280 # test queuepush / queuepop with keys 281 281 macro test5.1 282 282 $PASS = 1 283 283 queueinit dummy 284 284 queuepush dummy "test 1 word" … … 292 292 end 293 293 294 # test queuedelete294 # memory test for queuepush / queuepop with keys 295 295 macro testmem5.0 296 296 $PASS = 1 297 297 queueinit dummy 298 298 … … 322 322 end 323 323 324 # test queuedelete324 # memory test for queuepush / queuepop with keys 325 325 macro testmem5.1 326 326 $PASS = 1 327 327 queueinit dummy 328 328 … … 346 346 end 347 347 end 348
Note:
See TracChangeset
for help on using the changeset viewer.
