@@ -0,0 +1,989 @@
+import numpy as np%0A%0Aimport xarray as xr%0A%0Afrom . import parameterized, requires_dask%0A%0A%0Aclass GroupBy:%0A    def setup(self, *args, **kwargs):%0A        self.ds = xr.Dataset(%0A            %7B%0A                %22a%22: xr.DataArray(np.r_%5Bnp.arange(500.0), np.arange(500.0)%5D),%0A                %22b%22: xr.DataArray(np.arange(1000.0)),%0A            %7D%0A        )%0A%0A    @parameterized(%5B%22method%22%5D, %5B(%22sum%22, %22mean%22)%5D)%0A    def time_agg(self, method):%0A        return getattr(self.ds.groupby(%22a%22), method)()%0A%0A%0Aclass GroupByDask(GroupBy):%0A    def setup(self, *args, **kwargs):%0A        requires_dask()%0A        super().setup(**kwargs)%0A        self.ds = self.ds.chunk(%7B%22dim_0%22: 50%7D)%0A%0A%0Aclass GroupByDataFrame(GroupBy):%0A    def setup(self, *args, **kwargs):%0A        super().setup(**kwargs)%0A        self.ds = self.ds.to_dataframe()%0A%0A%0Aclass GroupByDaskDataFrame(GroupBy):%0A    def setup(self, *args, **kwargs):%0A        requires_dask()%0A        super().setup(**kwargs)%0A        self.ds = self.ds.chunk(%7B%22dim_0%22: 50%7D).to_dataframe()%0A

Create benchmark for groupby (#5772)