gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] libvob bench/mark.py test/vob/gl/paper.test vob...


From: Tuomas J. Lukka
Subject: [Gzz-commits] libvob bench/mark.py test/vob/gl/paper.test vob...
Date: Thu, 08 May 2003 09:21:35 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Changes by:     Tuomas J. Lukka <address@hidden>        03/05/08 09:21:35

Modified files:
        bench          : mark.py 
        test/vob/gl    : paper.test 
        vob            : __init__.py 
Added files:
        .              : runbench.py 
        org/nongnu/libvob/gl: SpecialPapers.java 
        test/vob/gl    : specialpaper.test 

Log message:
        Benching working; special paper

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/runbench.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/bench/mark.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/gl/SpecialPapers.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/test/vob/gl/specialpaper.test?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/test/vob/gl/paper.test.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/__init__.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text

Patches:
Index: libvob/bench/mark.py
diff -u libvob/bench/mark.py:1.7 libvob/bench/mark.py:1.8
--- libvob/bench/mark.py:1.7    Thu Apr 24 08:04:57 2003
+++ libvob/bench/mark.py        Thu May  8 09:21:35 2003
@@ -6,9 +6,8 @@
 
 
 import sys
-sys.path.insert(0, ".")
 import vob
-import vob.util
+vob = sys.modules["vob"]
 
 import sys, types, traceback
 
@@ -75,59 +74,59 @@
 def runPureBench(func, args):
     for ar in _argLists(args):
        # Precompile for JIT
-       func(1, ar)
-       func(1, ar)
-       func(1, ar)
+       func(1, **ar)
+       func(1, **ar)
+       func(1, **ar)
 
        total = 0
        iters = 1
        while total < 2.0:
            iters *= 2
            (total, str) = func(iters, **ar)
-           ms = total / iters * 1000
+           ms = total * 1. / iters * 1000
        print str
+       print ar
        print ms, "ms   with ",iters," in ",total
        print 1000.0 / ms,"per second\n"
            
 
-if __name__ == "__main__":
-    import getopt
-    print dir(vob)
-    print dir(vob.putil)
-    print dir(vob.util)
-    opts, args = getopt.getopt(sys.argv[1:], 
-            vob.putil.dbg.short, 
-            vob.putil.dbg.long)
-    for o,a in opts:
-        print "Opt: ",o,a
-       vob.putil.dbg.option(o,a)
-
-    # testmod = "bench.vob.text.overhead"
-    # testmod = "bench.vob.paper.dice"
-    # testmod = "bench.vob.trans.trivial"
-    testmod = args[0]
-    print "TESTMOD: ",testmod
+import getopt
+print dir(vob)
+print dir(vob.putil)
+print dir(vob.util)
+opts, args = getopt.getopt(sys.argv[1:], 
+       vob.putil.dbg.short, 
+       vob.putil.dbg.long)
+for o,a in opts:
+    print "Opt: ",o,a
+    vob.putil.dbg.option(o,a)
+
+# testmod = "bench.vob.text.overhead"
+# testmod = "bench.vob.paper.dice"
+# testmod = "bench.vob.trans.trivial"
+testmod = args[0]
+print "TESTMOD: ",testmod
+
 
 
+class Starter(java.lang.Runnable):
+    def run(self):
+       exec "import "+testmod+"\ntestmod = "+testmod+"\n"
+       try:
+           if hasattr(testmod, "benchScene"):
+               runVSBench(testmod.benchScene, testmod.args)
+           else:
+               runPureBench(testmod.bench, testmod.args)
+       except:
+           typ, val, tra = sys.exc_info()
+           print (repr((typ, val)))
+           print str(val)
+           l = traceback.format_list(traceback.extract_tb(tra))
+           print "\n".join(l)
+       print "Calling system.exit"
+       java.lang.System.exit(0)
+vob.GraphicsAPI.getInstance().startUpdateManager(Starter())
 
-    class Starter(java.lang.Runnable):
-        def run(self):
-           exec "import "+testmod+"\ntestmod = "+testmod+"\n"
-            try:
-               if hasattr(testmod, "benchScene"):
-                   runVSBench(testmod.benchScene, testmod.args)
-               else:
-                   runPureBench(testmod.bench, testmod.args)
-            except:
-                typ, val, tra = sys.exc_info()
-                print (repr((typ, val)))
-                print str(val)
-                l = traceback.format_list(traceback.extract_tb(tra))
-                print "\n".join(l)
-            print "Calling system.exit"
-            java.lang.System.exit(0)
-    vob.GraphicsAPI.getInstance().startUpdateManager(Starter())
-    
 
 # 4 cases:
 # run(None, { "a": (1,2), "b": (3,4), "c": 5 })
Index: libvob/test/vob/gl/paper.test
diff -u libvob/test/vob/gl/paper.test:1.5 libvob/test/vob/gl/paper.test:1.6
--- libvob/test/vob/gl/paper.test:1.5   Tue Apr 15 14:53:13 2003
+++ libvob/test/vob/gl/paper.test       Thu May  8 09:21:35 2003
@@ -61,7 +61,7 @@
     the Java API, renders anything.
     """
     vs = getvs()
-    vs.map.put(SolidBackdropVob(Color.black))
+    vs.put(SolidBackdropVob(Color.black))
     render(vs)
     checkAvgColor(100, 100, 2, 2, (0, 0, 0))
 
Index: libvob/vob/__init__.py
diff -u libvob/vob/__init__.py:1.6 libvob/vob/__init__.py:1.7
--- libvob/vob/__init__.py:1.6  Wed Apr 23 10:30:00 2003
+++ libvob/vob/__init__.py      Thu May  8 09:21:35 2003
@@ -1,8 +1,12 @@
 #foo
 
+print "VOB INIT"
+
 import vob.gl
 import vob.util
 import vob.putil
+
+print "Vob init: Imported vob.putil: ",vob.putil
 
 import org.nongnu.libvob as _libvob
 import java as _java




reply via email to

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