logging: add a LogHandler::getConfig() method
[folly.git] / folly / test / FBStringTestBenchmarks.cpp.h
index 632f7bd61fddde143f34b240e949a88f5bb48219..90bb8312cf5889e3f7b7f600117f8933e6a2fa37 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 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.
@@ -60,9 +60,11 @@ void BENCHFUN(ctorFromArray)(size_t iters, size_t arg) {
 BENCHMARK_PARAM(BENCHFUN(ctorFromArray), 32768);
 
 void BENCHFUN(ctorFromTwoPointers)(size_t iters, size_t arg) {
-  static STRING s;
+  /* library-local */ static STRING s;
   BENCHMARK_SUSPEND {
-    if (s.size() < arg) s.resize(arg);
+    if (s.size() < arg) {
+      s.resize(arg);
+    }
   }
   FOR_EACH_RANGE (i, 0, iters) {
     STRING s1(s.begin(), s.end());