소스 검색

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)