Changeset 10647 for trunk/Ohana/src/opihi/cmd.basic/test/for.sh
- Timestamp:
- Dec 11, 2006, 10:15:41 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.basic/test/for.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.basic/test/for.sh
r10311 r10647 8 8 memtest1 9 9 memtest2 10 memtest2a 10 11 memtest3 11 12 end … … 162 163 end 163 164 165 # check memleaks with many loop lines 166 macro memtest2a 167 168 local i N 169 170 list word -x "ps -p $PID -o rss" 171 $startmem = $word:1 172 173 output /dev/null 174 for i 0 10000 175 echo "test line in loop" 176 echo "test line in loop" 177 end 178 output stdout 179 180 list word -x "ps -p $PID -o rss" 181 $endmem = $word:1 182 183 $PASS = 1 184 185 if ($endmem - $startmem > 10) 186 $PASS = 0 187 echo "growth: {$endmem-$startmem}" 188 echo "kB/loop: {($endmem-$startmem)/10000}" 189 end 190 end 191 192 # check memleaks with many loop lines 193 macro memtest2b 194 195 local i N 196 197 list word -x "ps -p $PID -o rss" 198 $startmem = $word:1 199 200 output /dev/null 201 for i 0 1000 202 exec echo "test line in loop" > /dev/null 203 exec echo "test line in loop" > /dev/null 204 end 205 output stdout 206 207 list word -x "ps -p $PID -o rss" 208 $endmem = $word:1 209 210 $PASS = 1 211 212 if ($endmem - $startmem > 10) 213 $PASS = 0 214 echo "growth: {$endmem-$startmem}" 215 echo "kB/loop: {($endmem-$startmem)/1000}" 216 end 217 end 218 164 219 # check memleaks on break 165 220 macro memtest3
Note:
See TracChangeset
for help on using the changeset viewer.
