Commit 622458f2 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[scripts][benchmark] Fix print statements

parent 134601e5
......@@ -13,7 +13,7 @@ import zmq
prefix = pkg_resources.resource_filename(__name__, '../test/prefix')
print prefix
print(prefix)
......@@ -25,7 +25,7 @@ class CustomDataSource(DataSource):
self.dataformat = dataformat
self.file = open('benchmark.data', 'rb')
self.unpack = True
def next(self):
self.file.seek(0)
packed = self.file.read()
......@@ -40,7 +40,7 @@ class CustomDataSource(DataSource):
self.current += 1
return result
def hasMoreData(self):
return self.current < self.nb_data_units
......@@ -63,7 +63,7 @@ def main():
data_source = CustomDataSource(10000, dataformat)
print 'Nb Data units: %d' % data_source.nb_data_units
print('Nb Data units: %d' % data_source.nb_data_units)
t1 = time.time()
......@@ -72,7 +72,7 @@ def main():
t2 = time.time()
print 'Datasource (unpack): %.3fs (%.3fms/unit)' % (t2 - t1, (t2 - t1) * 1000.0 / data_source.nb_data_units)
print('Datasource (unpack): %.3fs (%.3fms/unit)' % (t2 - t1, (t2 - t1) * 1000.0 / data_source.nb_data_units))
data_source.reset()
......@@ -88,7 +88,7 @@ def main():
t2 = time.time()
print 'Datasource (packed): %.3fs (%.3fms/unit)' % (t2 - t1, (t2 - t1) * 1000.0 / data_source.nb_data_units)
print('Datasource (packed): %.3fs (%.3fms/unit)' % (t2 - t1, (t2 - t1) * 1000.0 / data_source.nb_data_units))
data_source.reset()
......@@ -123,7 +123,7 @@ def main():
t2 = time.time()
print 'Input (packed): %.3fs (%.3fms/unit)' % (t2 - t1, (t2 - t1) * 1000.0 / data_source.nb_data_units)
print('Input (packed): %.3fs (%.3fms/unit)' % (t2 - t1, (t2 - t1) * 1000.0 / data_source.nb_data_units))
data_source.reset()
......@@ -169,7 +169,7 @@ def main():
t2 = time.time()
print 'Remote (unpack): %.3fs (%.3fms/unit)' % (t2 - t1, (t2 - t1) * 1000.0 / data_source.nb_data_units)
print('Remote (unpack): %.3fs (%.3fms/unit)' % (t2 - t1, (t2 - t1) * 1000.0 / data_source.nb_data_units))
data_source.reset()
......@@ -186,6 +186,6 @@ def main():
t2 = time.time()
print 'Remote (packed): %.3fs (%.3fms/unit)' % (t2 - t1, (t2 - t1) * 1000.0 / data_source.nb_data_units)
print('Remote (packed): %.3fs (%.3fms/unit)' % (t2 - t1, (t2 - t1) * 1000.0 / data_source.nb_data_units))
data_source.reset()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment