瀏覽代碼

Updated test to give averages

Yentl Van Tendeloo 8 年之前
父節點
當前提交
46fbdd5137
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      wrappers/test.py

+ 6 - 3
wrappers/test.py

@@ -6,8 +6,11 @@ import random
 init()
 login(str(random.random()), str(random.random()))
 
+tot = 0.0
+
 for _ in range(10):
-    print("START @ " + str(time.time()))
+    start = time.time()
     model_list()
-    print("END @ " + str(time.time()))
-    sys.stdout.flush()
+    tot += (time.time() - start)
+
+print(tot/10.0)