Enlightenment CVS committal

Author  : onefang
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_desktop


Modified Files:
        ecore_desktop.c 


Log Message:
Don't print instrumentation data if there is nothing to print.

===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_desktop/ecore_desktop.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- ecore_desktop.c     25 Sep 2006 13:04:25 -0000      1.51
+++ ecore_desktop.c     25 Sep 2006 13:33:37 -0000      1.52
@@ -978,12 +978,15 @@
 EAPI void
 ecore_desktop_instrumentation_print(void)
 {
-   printf("vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n");
-   printf("    Found %5d desktops          %2.5f (%2.6f/desktop)\n", 
instrumentation.desktops, instrumentation.desktops_time, 
instrumentation.desktops_time / instrumentation.desktops);
-   printf("    Found %5d desktops in cache %2.5f (%2.6f/desktop)\n", 
instrumentation.desktops_in_cache, instrumentation.desktops_in_cache_time, 
instrumentation.desktops_in_cache_time / instrumentation.desktops_in_cache);
-   printf("Not found %5d desktops          %2.5f (%2.6f/desktop)\n", 
instrumentation.desktops_not_found, instrumentation.desktops_not_found_time, 
instrumentation.desktops_not_found_time / instrumentation.desktops_not_found);
-   printf("    Found %5d icons             %2.5f (%2.6f/icon)\n", 
instrumentation.icons, instrumentation.icons_time, instrumentation.icons_time / 
instrumentation.icons);
-   printf("    Found %5d icons    in cache %2.5f (%2.6f/icon)\n", 
instrumentation.icons_in_cache, instrumentation.icons_in_cache_time, 
instrumentation.icons_in_cache_time / instrumentation.icons_in_cache);
-   printf("Not found %5d icons             %2.5f (%2.6f/icon)\n", 
instrumentation.icons_not_found, instrumentation.icons_not_found_time, 
instrumentation.icons_not_found_time / instrumentation.icons_not_found);
-   printf("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
+   if ((instrumentation.desktops + instrumentation.desktops_in_cache + 
instrumentation.desktops_not_found + instrumentation.icons + 
instrumentation.icons_in_cache + instrumentation.icons_not_found) > 0)
+     {
+        
printf("vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n");
+        printf("    Found %5d desktops          %2.5f (%2.6f/desktop)\n", 
instrumentation.desktops, instrumentation.desktops_time, 
instrumentation.desktops_time / instrumentation.desktops);
+        printf("    Found %5d desktops in cache %2.5f (%2.6f/desktop)\n", 
instrumentation.desktops_in_cache, instrumentation.desktops_in_cache_time, 
instrumentation.desktops_in_cache_time / instrumentation.desktops_in_cache);
+        printf("Not found %5d desktops          %2.5f (%2.6f/desktop)\n", 
instrumentation.desktops_not_found, instrumentation.desktops_not_found_time, 
instrumentation.desktops_not_found_time / instrumentation.desktops_not_found);
+        printf("    Found %5d icons             %2.5f (%2.6f/icon)\n", 
instrumentation.icons, instrumentation.icons_time, instrumentation.icons_time / 
instrumentation.icons);
+        printf("    Found %5d icons    in cache %2.5f (%2.6f/icon)\n", 
instrumentation.icons_in_cache, instrumentation.icons_in_cache_time, 
instrumentation.icons_in_cache_time / instrumentation.icons_in_cache);
+        printf("Not found %5d icons             %2.5f (%2.6f/icon)\n", 
instrumentation.icons_not_found, instrumentation.icons_not_found_time, 
instrumentation.icons_not_found_time / instrumentation.icons_not_found);
+        
printf("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
+     }
 }



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to