gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gfx/demo fisheye.py


From: Janne V. Kujala
Subject: [Gzz-commits] gzz/gfx/demo fisheye.py
Date: Thu, 12 Sep 2002 12:31:43 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Janne V. Kujala <address@hidden>        02/09/12 12:31:43

Modified files:
        gfx/demo       : fisheye.py 

Log message:
        Add benchmarking ("b")

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/fisheye.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text

Patches:
Index: gzz/gfx/demo/fisheye.py
diff -c gzz/gfx/demo/fisheye.py:1.8 gzz/gfx/demo/fisheye.py:1.9
*** gzz/gfx/demo/fisheye.py:1.8 Thu Sep 12 11:55:52 2002
--- gzz/gfx/demo/fisheye.py     Thu Sep 12 12:31:43 2002
***************
*** 13,18 ****
--- 13,22 ----
      if k == "d":
          global dbg
          dbg = not dbg
+     if k == "b":
+         benchmark=1
+       AbstractUpdateManager.setNoAnimation()
+       AbstractUpdateManager.chg()
  
  
  def addpdftex(pap):
***************
*** 81,86 ****
--- 85,100 ----
  
  rng = java.util.Random()
  
+ 
+ benchmark = 0
+ def dobenchmark(w, vs):
+     global benchmark
+     if benchmark:
+         benchmark = 0
+         iters = 10
+         t = w.timeRender(vs, iters)
+         print "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Time of", iters, "renders:", 
t, "s"
+ 
  class FisheyeScene:
      def __init__(self):
          self.bgcolor = (1,1,1)
***************
*** 128,132 ****
--- 142,149 ----
                                         400 * bs * math.exp(-bl) * 
math.cos(ba))
  
        vs.map.put(self.fpq, cs1, cs2)
+ 
+         dobenchmark(w, vs)
+ 
  
  currentScene = FisheyeScene()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]