X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=folly%2Fgen%2Ftest%2FStringBenchmark.cpp;h=96143b081ea63cae55993f67eb769896cd089298;hp=2acaeb2879e6781a7687843f6e84a12b6709d135;hb=78a596f109f3eb852620ec0be655894547769555;hpb=77590b52456468d6e29ace19cae6b8f6162c6cdd diff --git a/folly/gen/test/StringBenchmark.cpp b/folly/gen/test/StringBenchmark.cpp index 2acaeb28..96143b08 100644 --- a/folly/gen/test/StringBenchmark.cpp +++ b/folly/gen/test/StringBenchmark.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2015 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,12 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include + #include #include -#include #include +#include #include #include @@ -61,7 +63,7 @@ void initStringResplitterBenchmark() { size_t len(folly::StringPiece s) { return s.size(); } -} // namespace +} // namespace BENCHMARK(StringResplitter_Big, iters) { size_t s = 0; @@ -171,7 +173,6 @@ BENCHMARK_RELATIVE(StringUnsplit_Old_ReusedBuffer, iters) { BENCHMARK_RELATIVE(StringUnsplit_Gen, iters) { size_t s = 0; - StringPiece line(kLine); while (iters--) { fbstring joined = from(testStrVector) | unsplit(','); s += joined.size();