mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 09:05:47 +08:00
Add benchmark
This commit is contained in:
1 parent
9ba413106f
commit
0ca1bfc583
1 file changed
+15
@@ -90,3 +90,18 @@ class ZeroCopyPandasRead(object):
|
||||
|
||||
def time_deserialize_from_components(self):
|
||||
pa.deserialize_components(self.as_components)
|
||||
|
||||
|
||||
class SerializeDeserializePandas(object):
|
||||
|
||||
def setup(self):
|
||||
# 10 million length
|
||||
n = 10000000
|
||||
self.df = pd.DataFrame({'data': np.random.randn(n)})
|
||||
self.serialized = pa.serialize_pandas(self.df)
|
||||
|
||||
def time_serialize_pandas(self):
|
||||
pa.serialize_pandas(self.df)
|
||||
|
||||
def time_deserialize_pandas(self):
|
||||
pa.deserialize_pandas(self.serialized)
|
||||
Reference in new issue
Block a user