BENCH: fix noisy asv benchmarks that were running on exhausted generators
State: closed

Generators get consumed on first use, yielding abnormally fast benchmark times on the `n>1` iterations. Fortunately we can instruct `asv` to call `setup()` prior to every sample by setting `number = 1` and `repeat` appropriately. My local runs suggest the typical number of samples is `~150-250`, so an upper limit of `250` appears to be a good fit.

Here is current `master` with old benchmark version:
```
[ 75.00%] ··· Running (ctors.SeriesConstructors.time_series_constructor--).
[100.00%] ··· ctors.SeriesConstructors.time_series_constructor                                                                                                   4/40 failed
[100.00%] ··· ===================================== =============== ============= ============== =============
              --                                                        with_index / dtype
              ------------------------------------- ----------------------------------------------------------
                             data_fmt                False / float   False / int   True / float    True / int
              ===================================== =============== ============= ============== =============
                      <function gen_of_str>            130±0.9μs       116±6μs        failed         failed
                     <function gen_of_tuples>           113±3μs        112±20μs       failed         failed
              ===================================== =============== ============= ============== =============
```
And with the fixed benchmarks, we see the existing ones falsely report a `40x` speedup:
```
[ 50.00%] ··· ===================================== =============== ============= ============== ============
              --                                                        with_index / dtype
              ------------------------------------- ---------------------------------------------------------
                             data_fmt                False / float   False / int   True / float   True / int
              ===================================== =============== ============= ============== ============
                      <function gen_of_str>            4.61±0.1ms    4.21±0.07ms       n/a           n/a
                     <function gen_of_tuples>          3.39±0.1ms    3.43±0.07ms       n/a           n/a
              ===================================== =============== ============= ============== ============
```

Additionally, this PR resolves a few failing `asv` tests that I introduced in the first iteration.

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Benchmark
description: Performance (ASV) benchmarks

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26772?src=pr&el=h1) Report
> Merging [#26772](https://codecov.io/gh/pandas-dev/pandas/pull/26772?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/d47fc0cba3cf94ebd289ad3776bf7ff3fe60dfb8?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #26772      +/-   ##
==========================================
- Coverage   91.71%   91.71%   -0.01%     
==========================================
  Files         178      178              
  Lines       50771    50771              
==========================================
- Hits        46567    46563       -4     
- Misses       4204     4208       +4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.3% <ø> (ø)` | :arrow_up: |
| #single | `41.19% <ø> (-0.09%)` | :arrow_down: |

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

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26772?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/26772?src=pr&el=footer). Last update [d47fc0c...bd5b433](https://codecov.io/gh/pandas-dev/pandas/pull/26772?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26772?src=pr&el=h1) Report
> Merging [#26772](https://codecov.io/gh/pandas-dev/pandas/pull/26772?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/d47fc0cba3cf94ebd289ad3776bf7ff3fe60dfb8?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #26772      +/-   ##
==========================================
- Coverage   91.71%   91.71%   -0.01%     
==========================================
  Files         178      178              
  Lines       50771    50771              
==========================================
- Hits        46567    46563       -4     
- Misses       4204     4208       +4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.3% <ø> (ø)` | :arrow_up: |
| #single | `41.19% <ø> (-0.09%)` | :arrow_down: |

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

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26772?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/26772?src=pr&el=footer). Last update [d47fc0c...bd5b433](https://codecov.io/gh/pandas-dev/pandas/pull/26772?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

thanks @qwhelan