[Xastir-dev] tiger map query time debug

Dan Brown brown at brauhausdc.org
Mon Nov 22 21:00:15 EST 2004


Here's some quick diffs to add in a timing debug for tiger.census.gov
queries:

http://www.brauhaus.org/~brown/xastir/map_tiger.c_diffs_20041122_query_time


-----------------------------------------------------------------

--- xastir/src/map_tiger.c	2004-11-19 21:49:31.000000000 -0500
+++ xastir-n8ysz/src/map_tiger.c	2004-11-22 20:55:22.000000000 -0500
@@ -207,6 +207,8 @@
      int geo_image_width;        // Image width  from GEO file
      int geo_image_height;       // Image height from GEO file

+    time_t query_start_time, query_end_time; 
+
  #ifdef USE_MAP_CACHE
  	int map_cache_return;
  #endif  // USE_MAP_CACHE
@@ -395,6 +397,9 @@
            fprintf(stderr,"ftp or http file: %s\n", fileimg);
      }

+    if (debug_level & 512) {
+        query_start_time=time(&query_start_time); 
+    }

  #ifdef USE_MAP_CACHE

@@ -508,6 +513,10 @@
      // For debugging the MagickError/MagickWarning segfaults.
      //system("cat /dev/null >/var/tmp/xastir_hacker_map.gif");

+
+    (debug_level & 512) && fprintf (stderr, "Query took %d seconds\n", 
+                            (int) (time(&query_end_time) - query_start_time)); 
+
  #ifdef USE_MAP_CACHE

  	map_cache_put(fileimg,local_filename); 
-----------------------------------------------------------------



--
Dan Brown 
brown at brauhausdc.org



More information about the Xastir-dev mailing list