CLN/ASV clean-up frame stat ops benchmarks
State: closed

Small clean-up and testing of both with/without bottleneck. 

Also includes a benchmark for https://github.com/pandas-dev/pandas/pull/16509

Labels:
name: Performance
description: Memory or execution speed performance
name: Clean

Comments:
Hello @jorisvandenbossche! Thanks for submitting the PR.

 - In the file [`asv_bench/benchmarks/stat_ops.py`](https://github.com/pandas-dev/pandas/blob/19a2cc4a5fc444f3bd41982153b3ce34fd05d319/asv_bench/benchmarks/stat_ops.py), following are the PEP8 issues :

> [Line 7:5](https://github.com/pandas-dev/pandas/blob/19a2cc4a5fc444f3bd41982153b3ce34fd05d319/asv_bench/benchmarks/stat_ops.py#L7): [E722](https://duckduckgo.com/?q=pep8%20E722) do not use bare except'


Output is currently something like this:

```
(dev) joris@joris-XPS-13-9350:~/scipy/pandas/asv_bench$ asv dev -b FrameOps
· Discovering benchmarks
· Running 1 total benchmarks (1 commits * 1 environments * 1 benchmarks)
[  0.00%] ·· Building for existing-py_home_joris_miniconda3_envs_dev_bin_python
[  0.00%] ·· Benchmarking existing-py_home_joris_miniconda3_envs_dev_bin_python
[100.00%] ··· Running stat_ops.FrameOps.time_op                                                                                                                                                                                                                               ok
[100.00%] ···· 
               ======== ================== ================== ================ ================ =================== =================== ================= =================
               --                                                                  use_bottleneck / dtype / axis                                                           
               -------- ---------------------------------------------------------------------------------------------------------------------------------------------------
                  op     True / float / 0   True / float / 1   True / int / 0   True / int / 1   False / float / 0   False / float / 1   False / int / 0   False / int / 1 
               ======== ================== ================== ================ ================ =================== =================== ================= =================
                 mean         1.23ms             1.53ms            1.58ms           1.70ms             5.33ms              9.06ms             6.91ms            8.09ms     
                 sum          1.13ms             1.52ms            1.33ms           1.58ms             5.64ms              6.24ms             6.06ms            6.76ms     
                median        8.52ms             6.53ms            7.84ms           6.46ms            12.68ms              3.66s             13.17ms            3.40s      
               ======== ================== ================== ================ ================ =================== =================== ================= =================
```
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17205?src=pr&el=h1) Report
> Merging [#17205](https://codecov.io/gh/pandas-dev/pandas/pull/17205?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/556effcba52f4712fed21b269e9782f1a309ea93?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/17205/graphs/tree.svg?token=eZ4WkYLtcO&width=650&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/17205?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #17205      +/-   ##
==========================================
- Coverage   91.03%   91.01%   -0.02%     
==========================================
  Files         162      162              
  Lines       49511    49511              
==========================================
- Hits        45070    45061       -9     
- Misses       4441     4450       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.79% <ø> (ø)` | :arrow_up: |
| #single | `40.26% <ø> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17205?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17205?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17205?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.71% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17205?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17205?src=pr&el=footer). Last update [556effc...19a2cc4](https://codecov.io/gh/pandas-dev/pandas/pull/17205?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

that formatting is actually hard to read (IOW its better if all of the comparisons on row-wise). did you do something to get that?
nope, this is just the default output of asv when you have parameterized benchmarks. I agree it is not that clear. 
But, when you do a comparison of eg PR against master, you get them as separate entries in the before/after table. So given that, I think this is OK (the only alternative is not using parameterized tests, or asking asv to have an option to change the formatting)
ahh I c, ok then.
thanks!