Add write benchmark, write more rows

This commit is contained in:
Wes McKinney committed 2019-10-16 11:22:57 -05:00
1 parent 1d604339fc
commit 0b8d690e75
1 file changed
+9 -5
+9 -5
View File
@@ -135,18 +135,22 @@ class ParquetWriteDictionaries(object):
class ParquetManyColumns(object):
total_cells = 1000000
total_cells = 10000000
param_names = ('num_cols',)
params = [100, 1000, 10000]
def setup(self, num_cols):
num_rows = self.total_cells // num_cols
table = pa.table({'c' + str(i): np.random.randn(num_rows)
for i in range(num_cols)})
self.table = pa.table({'c' + str(i): np.random.randn(num_rows)
for i in range(num_cols)})
out = pa.BufferOutputStream()
pq.write_table(table, out)
pq.write_table(self.table, out)
self.buf = out.getvalue()
def time_read_time(self, num_cols):
def time_write(self, num_cols):
out = pa.BufferOutputStream()
pq.write_table(self.table, out)
def time_read(self, num_cols):
pq.read_table(self.buf)