Added total timing to compare old for loop to Sitemap process method.
authorFredrik Unger <fred@tree.se>
Sun, 10 Apr 2011 14:33:19 +0000 (16:33 +0200)
committerFredrik Unger <fred@tree.se>
Sun, 10 Apr 2011 14:33:19 +0000 (16:33 +0200)
src/tree-cutter.py

index 37b893a0961529fcdb66b230f5bb9d68f0e83e31..5f411496488e72178985fa8bf7c973f4bc1e0dfb 100755 (executable)
@@ -560,6 +560,7 @@ print "Publish  [%5.2f s]" % (round(t2-t1,2))
 
 sitemap = generateSitemap()
 tmptarget = tempfile.mkdtemp()+'/'
+tot = 0
 for page in sitemap:
     t1 = time.time()
     print "Page : %-30s %30s" % (page['link'],
@@ -569,7 +570,9 @@ for page in sitemap:
     writeToTemplate(page,pubdoc,sitemap)
     t2 = time.time()
     print "[%5.2f s]" % (round(t2-t1,2))
+    tot = tot + (t2-t1)
 
+print "Total time\t\t\t\t\t\t\t     [%5.2f s]" % (round(tot,2))
 createSitemap(sitemap)
 publish(tmptarget, args.output)
 publish(args.style+"css", args.output)