Commit 4bfa1a41 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by facebook-github-bot-9

Fully clean up before each round of benchmarks in RangeFindBenchmark.cpp

Summary: [Folly] Fully clean up before each round of benchmarks in `RangeFindBenchmark.cpp`.

The `vstr` and `vstrp` globals need to be cleaned up before each round of benchmarks.

Reviewed By: @​@​nbronson

Differential Revision: D2467254
parent e8c07bf4
...@@ -43,8 +43,11 @@ std::vector<StringPiece> vstrp; ...@@ -43,8 +43,11 @@ std::vector<StringPiece> vstrp;
std::string file; std::string file;
void initStr(int len) { void initStr(int len) {
cout << "string length " << len << ':' << endl;
str.clear(); str.clear();
vstr.clear();
vstrp.clear();
cout << "string length " << len << ':' << endl;
str.reserve(len + 1); str.reserve(len + 1);
str.append(len, 'a'); str.append(len, 'a');
str.append(1, 'b'); str.append(1, 'b');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment