Page 1 of 1
how to get the using time when runing a command?
Posted: 2011-03-16T21:12:08-07:00
by linjuming
how to get the using time when runing a command?
such as ,I wan to know:
Code: Select all
convert -size 1000x1000 xc:white white.png
convert white.png -resize: 1000x1000 white.png
or use imagick php code to do that
which is faster,how to get the using time?
Re: how to get the using time when runing a command?
Posted: 2011-03-16T21:20:29-07:00
by anthony
try using time command
Code: Select all
time convert rose: null
real 0m0.011s
user 0m0.002s
sys 0m0.009s
taht is 0.011 second overall. but only .002 for the actual command, rather than kernel processing
Re: how to get the using time when runing a command?
Posted: 2011-03-16T21:21:28-07:00
by fmw42
on unix/mac you can use time function
time convert -size 1000x1000 xc:white white.png
time convert white.png -resize: 1000x1000 white.png
or
time convert -size 1000x1000 xc:white PNG:- | convert - white.png -resize: 1000x1000 white.png
or faster
time convert -size 1000x1000 xc:white MIFF:- | convert - white.png -resize: 1000x1000 white.png
or faster yet
time convert -size 1000x1000 xc:white -resize: 1000x1000 white.png
or since the image is constant, then use -scale or -sample rather than -resize and it will be even faster.
or just create it the final size
time convert -size 1000000x1000000 xc:white white.png
Re: how to get the using time when runing a command?
Posted: 2011-03-16T21:32:47-07:00
by linjuming
thanks ,help much!