Test benchmark cleanup

This commit is contained in:
Mathieu Comandon 2016-08-05 17:35:47 -07:00
parent 6490ce840a
commit b71bc73112

View file

@ -2,25 +2,24 @@ import time
import urllib
import sys
import os
import gi
gi.require_version('Gdk', '3.0')
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk, GObject
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
from lutris.util import http
from lutris.gui.dialogs import DownloadDialog
TEST_URL = "https://lutris.net/releases/lutris_0.3.5.tar.gz"
TEST_FILE_SIZE = 11034817
# TEST_URL = "ftp://ftp.3drealms.com/share/3dsw12.zip"
# TEST_URL = "ftp://ftp.idsoftware.com/idstuff/wolf/linux/wolf-linux-1.41b.x86.run"
# TEST_URL = "ftp://download.nvidia.com/XFree86/Linux-x86/319.23/NVIDIA-Linux-x86-319.23.run"
# TEST_URL = "smb://newport/games/linux/aquaria/aquaria-lnx-humble-bundle.mojo.run"
TEST_URL = "https://lutris.net/releases/lutris_0.3.0.tar.gz"
TEST_FILE_SIZE = 4582508
Gdk.threads_init()
GObject.threads_init()
def timed(function):
def _wrapped(*args, **kwargs):
print(">",)
start_time = time.time()
retval = function(*args, **kwargs)
total = time.time() - start_time