From 4bfa1a41db9d1e54ffb9a32aa9d39c8bd6e28b02 Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Tue, 22 Sep 2015 14:03:09 -0700 Subject: [PATCH] Fully clean up before each round of benchmarks in RangeFindBenchmark.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- folly/test/RangeFindBenchmark.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/folly/test/RangeFindBenchmark.cpp b/folly/test/RangeFindBenchmark.cpp index 7d7a872d..2c920b72 100644 --- a/folly/test/RangeFindBenchmark.cpp +++ b/folly/test/RangeFindBenchmark.cpp @@ -43,8 +43,11 @@ std::vector vstrp; std::string file; void initStr(int len) { - cout << "string length " << len << ':' << endl; str.clear(); + vstr.clear(); + vstrp.clear(); + + cout << "string length " << len << ':' << endl; str.reserve(len + 1); str.append(len, 'a'); str.append(1, 'b'); -- 2.34.1