From 5c528aa2dad278b8918073976832cdbb664c97e5 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Mon, 2 Sep 2019 14:36:10 -0700 Subject: [PATCH 1/2] Added return to JSON mem tests --- asv_bench/benchmarks/io/json.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asv_bench/benchmarks/io/json.py b/asv_bench/benchmarks/io/json.py index b249c92b53e93..5bbf8be285c75 100644 --- a/asv_bench/benchmarks/io/json.py +++ b/asv_bench/benchmarks/io/json.py @@ -119,7 +119,7 @@ def time_to_json(self, orient, frame): getattr(self, frame).to_json(self.fname, orient=orient) def mem_to_json(self, orient, frame): - getattr(self, frame).to_json(self.fname, orient=orient) + return getattr(self, frame).to_json(self.fname, orient=orient) def time_to_json_wide(self, orient, frame): base_df = getattr(self, frame).copy() @@ -129,7 +129,7 @@ def time_to_json_wide(self, orient, frame): def mem_to_json_wide(self, orient, frame): base_df = getattr(self, frame).copy() df = concat([base_df.iloc[:100]] * 1000, ignore_index=True, axis=1) - df.to_json(self.fname, orient=orient) + return df.to_json(self.fname, orient=orient) class ToJSONLines(BaseIO): From e1d2a82c420d448672b190fe9128f1304d270deb Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Mon, 2 Sep 2019 17:03:22 -0700 Subject: [PATCH 2/2] changed to peakmem --- asv_bench/benchmarks/io/json.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/asv_bench/benchmarks/io/json.py b/asv_bench/benchmarks/io/json.py index 5bbf8be285c75..5c1d39776b91c 100644 --- a/asv_bench/benchmarks/io/json.py +++ b/asv_bench/benchmarks/io/json.py @@ -118,18 +118,18 @@ def setup(self, orient, frame): def time_to_json(self, orient, frame): getattr(self, frame).to_json(self.fname, orient=orient) - def mem_to_json(self, orient, frame): - return getattr(self, frame).to_json(self.fname, orient=orient) + def peakmem_to_json(self, orient, frame): + getattr(self, frame).to_json(self.fname, orient=orient) def time_to_json_wide(self, orient, frame): base_df = getattr(self, frame).copy() df = concat([base_df.iloc[:100]] * 1000, ignore_index=True, axis=1) df.to_json(self.fname, orient=orient) - def mem_to_json_wide(self, orient, frame): + def peakmem_to_json_wide(self, orient, frame): base_df = getattr(self, frame).copy() df = concat([base_df.iloc[:100]] * 1000, ignore_index=True, axis=1) - return df.to_json(self.fname, orient=orient) + df.to_json(self.fname, orient=orient) class ToJSONLines(BaseIO):