[GRASS-user] trace processing time

Hello,
what tools can I use on both Linux and Windows to trace the processing time of a
GRASS operation?

I am doing a v.overlay on large data sets.

After the process finshes I would like to something like:
processing time for command "v.overlay" with parameters "yourparameters"
was 30min.

This would be very helpful to know how long the overall data processing takes
and plan new and similar projects.

Thanks and kind regards,
Tim

Try the Linux 'time' command:

$ time r.out.tiff -t input=TEST output=TEST_out
WARNING: Raster map <FishermansHole.1.ave.fill> in mapset <PERMANENT> is a
         floating point map. Decimal values will be rounded to integer!
100%
Writing TIFF World file
r.out.tiff complete.

real 0m0.400s
user 0m0.328s
sys 0m0.032s

~ Eric.

-----Original Message-----
From: grass-user-bounces@lists.osgeo.org on behalf of Tim Michelsen
Sent: Thu 11/29/2007 10:19 AM
To: grass-user@lists.osgeo.org
Subject: [GRASS-user] trace processing time

Hello,
what tools can I use on both Linux and Windows to trace the processing time of a
GRASS operation?

I am doing a v.overlay on large data sets.

After the process finshes I would like to something like:
processing time for command "v.overlay" with parameters "yourparameters"
was 30min.

This would be very helpful to know how long the overall data processing takes
and plan new and similar projects.

Thanks and kind regards,
Tim

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi Tim,

what tools can I use on both Linux and Windows to trace the processing
time of a GRASS operation?

On Linux you may use a shell-script to do that. Just redirect output
from
the 'date' command to a log file of your choice i.E.

*******
#!/bin/bash
LOGFILE="/tmp/myLog"

printf "%b" "Started processing on `date`\n" >> $LOGFILE
v.overlay ...
printf "%b" "Finished processing on `date`\n" >> $LOGFILE
*******

for windows you may use a batch script.

Alternatively you can use perl as well - this should work on both
systems.

Regards,
Martin

--
Martin Bley

Tim Michelsen wrote:

I am doing a v.overlay on large data sets.

After the process finshes I would like to something like:
processing time for command "v.overlay" with parameters "yourparameters"
was 30min.

It may speed things up a lot to first do a preprocessing step with v.select to
reduce the v.overlay operation to features of interest.

To date v.select only offers operator=overlap*. If you want not_overlap you can
do a trick with v.in.region to make a negative mask.

[*] for a patch see http://thread.gmane.org/gmane.comp.gis.grass.devel/9855/
("operator=discrete"?)

v.extract can be useful too (by feature type, SQL query, ...).
or v.in.ogr spatial= in the first place.

there is also the classic Florida coastline problem, if a single polygon is
huge:
  http://thread.gmane.org/gmane.comp.gis.grass.user/7391/
see also doc/vector/TODO : 2.) v.in.ogr

"v.in.ogr
--------
It would be useful to split long boundaries to smaller
pieces. Otherwise cleaning process can become very slow because
bounding box of long boundaries can overlap large part of the map (for
example outline around all areas) and cleaning process is checking
intersection with all boundaries falling in the bounding box."

in that case you might try v.split first to break the huge boundary into a
number of connected polylines. (does not affect topology, just internal
storage)

Hamish

      ____________________________________________________________________________________
Be a better sports nut! Let your teams follow you
with Yahoo Mobile. Try it now. http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ