Adding demonstrative test of O(n^2) string split case
authorTom Jackson <tjackson@fb.com>
Wed, 4 Feb 2015 18:52:34 +0000 (10:52 -0800)
committerAndrew Cox <andrewcox@fb.com>
Wed, 4 Feb 2015 21:03:44 +0000 (13:03 -0800)
commite7e16f3d559015083a62f1343dcc90c04a9e88f2
tree99ec07bd097b1ff3c910e45a26b02964a96cb19d
parentad4a9ff72a9bc385a01f075f977f29eb805fd127
Adding demonstrative test of O(n^2) string split case

Summary:
Even though the benchmark only keeps the first 10 lines, it gets slower the bigger the "file" is.

```
folly/gen/test/StringBenchmark.cpp              relative  time/iter  iters/s
----------------------------------------------------------------------------
Lines_Gen(1e3)                                               5.53us  180.94K
Lines_Gen(2e3)                                    66.43%     8.32us  120.21K
Lines_Gen(3e3)                                    48.26%    11.45us   87.33K
```

Test Plan: Benchmarks

Reviewed By: lesha@fb.com

Subscribers: folly-diffs@, yfeldblum

FB internal diff: D1823545

Tasks: 6155600

Signature: t1:1823545:1423023712:86fdb3dadbec44195e4b3596cf793cea80ae3a76
folly/gen/test/StringBenchmark.cpp