[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: pcb.git: branch: master updated (2682a6fdbae39859190e1527150464412e37c8eb)



The branch, master has been updated
       via  2682a6fdbae39859190e1527150464412e37c8eb (commit)
      from  71f29218994b8da19665bbb09f4e9d1213231047 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 src/file.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)


=================
 Commit Messages
=================

commit 2682a6fdbae39859190e1527150464412e37c8eb
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    file.c: Add profiling of CPU seconds consumed during file load
    
    This information is useful to benchmark the load of complex boards
    which consume a lot of CPU cycles clipping polygons during loading.
    
    Adding this upstream will allow me to gain information from users
    describing load slowness, without having a copy their design.

:100644 100644 dce31a8... 4cef71f... M	src/file.c

=========
 Changes
=========

commit 2682a6fdbae39859190e1527150464412e37c8eb
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    file.c: Add profiling of CPU seconds consumed during file load
    
    This information is useful to benchmark the load of complex boards
    which consume a lot of CPU cycles clipping polygons during loading.
    
    Adding this upstream will allow me to gain information from users
    describing load slowness, without having a copy their design.

diff --git a/src/file.c b/src/file.c
index dce31a8..4cef71f 100644
--- a/src/file.c
+++ b/src/file.c
@@ -350,6 +350,10 @@ LoadPCB (char *Filename)
 {
   PCBTypePtr newPCB = CreateNewPCB (False);
   Boolean units_mm;
+  clock_t start, end;
+  double elapsed;
+
+  start = clock ();
 
   /* new data isn't added to the undo list */
   if (!ParsePCB (newPCB, Filename))
@@ -395,6 +399,11 @@ LoadPCB (char *Filename)
 
       hid_action ("PCBChanged");
 
+      end = clock ();
+      elapsed = ((double) (end - start)) / CLOCKS_PER_SEC;
+      gui->log ("Loading file %s took %f seconds of CPU time\n",
+		Filename, elapsed);
+
       return (0);
     }
   hid_action ("PCBChanged");




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs