mirror of
https://github.com/lutris/lutris
synced 2024-09-04 23:13:35 +00:00
Update benchmark test file for python3
This commit is contained in:
parent
10409efcc8
commit
6490ce840a
|
@ -10,21 +10,21 @@ 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 = "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"
|
||||
Gdk.threads_init()
|
||||
GObject.threads_init()
|
||||
|
||||
|
||||
def timed(function):
|
||||
def _wrapped(*args, **kwargs):
|
||||
print ">",
|
||||
print(">",)
|
||||
start_time = time.time()
|
||||
retval = function(*args, **kwargs)
|
||||
total = time.time() - start_time
|
||||
print function.__name__, (TEST_FILE_SIZE / total) / 1048576
|
||||
print(function.__name__, (TEST_FILE_SIZE / total) / 1048576)
|
||||
return retval
|
||||
return _wrapped
|
||||
|
||||
|
@ -41,7 +41,7 @@ def test_download_asset():
|
|||
|
||||
class DownloadDialogBenchmark(DownloadDialog):
|
||||
def download_complete(self, _widget, _data):
|
||||
print "Complete"
|
||||
print("Complete")
|
||||
self.destroy()
|
||||
Gtk.main_quit()
|
||||
|
||||
|
@ -53,5 +53,5 @@ def test_download_dialog():
|
|||
|
||||
|
||||
test_download_dialog()
|
||||
#test_urlretrieve()
|
||||
#test_download_asset()
|
||||
# test_urlretrieve()
|
||||
# test_download_asset()
|
||||
|
|
Loading…
Reference in a new issue