Commit 36acaed4 authored by Alfred Fuller's avatar Alfred Fuller Committed by Facebook GitHub Bot

Fix include order and grouping in folly - 11/13

Summary: All changes were automated

Reviewed By: Orvid

Differential Revision: D25507581

fbshipit-source-id: 5c936f1f81c5c754d3b64fb17b7dab253a178a39
parent d99290f5
......@@ -20,10 +20,10 @@
#include <mutex>
#include <thread>
#include <folly/Benchmark.h>
#include <glog/logging.h>
#include <folly/Benchmark.h>
DEFINE_int32(threads, 16, "benchmark concurrency");
template <typename CallOnceFunc>
......
......@@ -14,6 +14,8 @@
* limitations under the License.
*/
#include <folly/synchronization/CallOnce.h>
#include <deque>
#include <mutex>
#include <thread>
......@@ -21,7 +23,6 @@
#include <folly/Traits.h>
#include <folly/portability/GTest.h>
#include <folly/synchronization/CallOnce.h>
static size_t const kNumThreads = 16;
......
......@@ -15,6 +15,11 @@
*/
#include <folly/synchronization/DistributedMutex.h>
#include <chrono>
#include <cmath>
#include <thread>
#include <folly/MapUtil.h>
#include <folly/Synchronized.h>
#include <folly/container/Array.h>
......@@ -24,10 +29,6 @@
#include <folly/test/DeterministicSchedule.h>
#include <folly/test/TestUtils.h>
#include <chrono>
#include <cmath>
#include <thread>
using namespace std::literals;
namespace folly {
......
......@@ -15,20 +15,20 @@
*/
#include <folly/synchronization/Hazptr.h>
#include <folly/synchronization/example/HazptrLockFreeLIFO.h>
#include <folly/synchronization/example/HazptrSWMRSet.h>
#include <folly/synchronization/example/HazptrWideCAS.h>
#include <folly/synchronization/test/Barrier.h>
#include <atomic>
#include <thread>
#include <folly/Singleton.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
#include <folly/synchronization/HazptrThreadPoolExecutor.h>
#include <folly/synchronization/example/HazptrLockFreeLIFO.h>
#include <folly/synchronization/example/HazptrSWMRSet.h>
#include <folly/synchronization/example/HazptrWideCAS.h>
#include <folly/synchronization/test/Barrier.h>
#include <folly/test/DeterministicSchedule.h>
#include <atomic>
#include <thread>
DEFINE_bool(bench, false, "run benchmark");
DEFINE_int64(num_reps, 10, "Number of test reps");
DEFINE_int32(num_threads, 6, "Number of threads");
......
......@@ -14,10 +14,10 @@
* limitations under the License.
*/
#include <thread>
#include <folly/synchronization/ParkingLot.h>
#include <thread>
#include <folly/Benchmark.h>
#include <folly/detail/Futex.h>
#include <folly/synchronization/Baton.h>
......
......@@ -14,10 +14,10 @@
* limitations under the License.
*/
#include <thread>
#include <folly/synchronization/ParkingLot.h>
#include <thread>
#include <folly/portability/GTest.h>
#include <folly/synchronization/Baton.h>
......
......@@ -21,6 +21,7 @@
#include <folly/synchronization/RWSpinLock.h>
#include <stdlib.h>
#include <thread>
#include <vector>
......
......@@ -15,6 +15,7 @@
*/
#include <folly/synchronization/SaturatingSemaphore.h>
#include <folly/portability/GTest.h>
#include <folly/test/DeterministicSchedule.h>
......
......@@ -15,11 +15,12 @@
*/
#include <folly/synchronization/Utility.h>
#include <folly/Utility.h>
#include <folly/portability/GTest.h>
#include <type_traits>
#include <folly/Utility.h>
#include <folly/portability/GTest.h>
class UtilityTest : public testing::Test {};
namespace {
......
......@@ -34,6 +34,7 @@
#include <fcntl.h>
#include <sys/types.h>
#include <system_error>
static constexpr ssize_t kDefaultMlockChunkSize = !folly::kMscVer
......
......@@ -16,12 +16,12 @@
#include <folly/system/Pid.h>
#include <folly/Likely.h>
#include <folly/detail/AtFork.h>
#include <atomic>
#include <glog/logging.h>
#include <atomic>
#include <folly/Likely.h>
#include <folly/detail/AtFork.h>
namespace folly {
......
......@@ -14,6 +14,8 @@
* limitations under the License.
*/
#include <folly/system/MemoryMapping.h>
#include <cstdlib>
#include <glog/logging.h>
......@@ -22,7 +24,6 @@
#include <folly/Random.h>
#include <folly/portability/GTest.h>
#include <folly/portability/SysMman.h>
#include <folly/system/MemoryMapping.h>
static constexpr double kSomeDouble = 3.14;
......
......@@ -16,10 +16,10 @@
#include <folly/system/Pid.h>
#include <folly/portability/GTest.h>
#include <glog/logging.h>
#include <folly/portability/GTest.h>
TEST(PidTest, basic) {
pid_t mypid = getpid();
EXPECT_EQ(mypid, folly::get_cached_pid());
......
......@@ -14,10 +14,11 @@
* limitations under the License.
*/
#include <folly/system/Shell.h>
#include <glog/logging.h>
#include <folly/portability/GTest.h>
#include <folly/system/Shell.h>
using namespace folly;
......
......@@ -14,12 +14,13 @@
* limitations under the License.
*/
#include <folly/system/ThreadName.h>
#include <thread>
#include <folly/ScopeGuard.h>
#include <folly/portability/GTest.h>
#include <folly/synchronization/Baton.h>
#include <folly/system/ThreadName.h>
using namespace std;
using namespace folly;
......
......@@ -14,11 +14,11 @@
* limitations under the License.
*/
#include <algorithm>
#include <folly/Benchmark.h>
#include <folly/Range.h>
#include <algorithm>
using namespace std;
using namespace folly;
......
......@@ -14,11 +14,11 @@
* limitations under the License.
*/
#include <folly/Range.h>
#include <algorithm>
#include <folly/Range.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
#include <algorithm>
using namespace std;
using namespace folly;
......
......@@ -16,13 +16,14 @@
#include <folly/detail/AtFork.h>
#include <folly/portability/GTest.h>
#include <glog/logging.h>
#include <atomic>
#include <mutex>
#include <thread>
#include <glog/logging.h>
#include <folly/portability/GTest.h>
TEST(ThreadLocal, AtFork) {
int foo;
bool forked = false;
......
......@@ -14,12 +14,13 @@
* limitations under the License.
*/
#include <folly/AtomicHashArray.h>
#include <cstddef>
#include <map>
#include <memory>
#include <stdexcept>
#include <folly/AtomicHashArray.h>
#include <folly/Conv.h>
#include <folly/Memory.h>
#include <folly/hash/Hash.h>
......
......@@ -14,10 +14,11 @@
* limitations under the License.
*/
#include <folly/AtomicLinkedList.h>
#include <algorithm>
#include <thread>
#include <folly/AtomicLinkedList.h>
#include <folly/portability/GTest.h>
class TestIntrusiveObject {
......
......@@ -15,13 +15,16 @@
*/
#include <folly/Benchmark.h>
#include <folly/String.h>
#include <folly/container/Foreach.h>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <random>
#include <vector>
#include <folly/String.h>
#include <folly/container/Foreach.h>
using namespace folly;
using namespace std;
......
......@@ -15,11 +15,12 @@
*/
#include <folly/test/BufferedAtomic.h>
#include <folly/SingletonThreadLocal.h>
#include <random>
#include <folly/SingletonThreadLocal.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
#include <random>
using namespace folly::test;
using DSched = DeterministicSchedule;
......
......@@ -16,11 +16,12 @@
#include <folly/CancellationToken.h>
#include <chrono>
#include <thread>
#include <folly/Optional.h>
#include <folly/portability/GTest.h>
#include <folly/synchronization/Baton.h>
#include <chrono>
#include <thread>
using namespace folly;
using namespace std::literals::chrono_literals;
......
......@@ -15,6 +15,7 @@
*/
#include <folly/Chrono.h>
#include <folly/portability/GTest.h>
using namespace std::chrono;
......
......@@ -16,11 +16,11 @@
#include <folly/ConcurrentBitSet.h>
#include <glog/logging.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
#include <glog/logging.h>
namespace folly {
namespace test {
......
......@@ -16,18 +16,20 @@
// @author: Xin Liu <xliux@fb.com>
#include <folly/ConcurrentSkipList.h>
#include <map>
#include <memory>
#include <random>
#include <set>
#include <thread>
#include <glog/logging.h>
#include <folly/Benchmark.h>
#include <folly/ConcurrentSkipList.h>
#include <folly/hash/Hash.h>
#include <folly/portability/GFlags.h>
#include <folly/synchronization/RWSpinLock.h>
#include <glog/logging.h>
DEFINE_int32(num_threads, 12, "num concurrent threads to test");
......
......@@ -14,12 +14,15 @@
* limitations under the License.
*/
#include <folly/Benchmark.h>
#include <folly/ConstexprMath.h>
#include <glog/logging.h>
#include <limits>
#include <type_traits>
#include <glog/logging.h>
#include <folly/Benchmark.h>
template <typename ValueT>
constexpr ValueT UBSafeAdd(ValueT a, ValueT b) {
using UnsignedT = typename std::make_unsigned<ValueT>::type;
......
......@@ -16,16 +16,16 @@
#include <folly/Conv.h>
#include <array>
#include <limits>
#include <stdexcept>
#include <boost/lexical_cast.hpp>
#include <folly/Benchmark.h>
#include <folly/CppAttributes.h>
#include <folly/container/Foreach.h>
#include <array>
#include <limits>
#include <stdexcept>
using namespace std;
using namespace folly;
......
......@@ -18,12 +18,7 @@
#define __STDC_FORMAT_MACROS 1
#endif
#include <boost/lexical_cast.hpp>
#include <glog/logging.h>
#include <folly/Conv.h>
#include <folly/container/Foreach.h>
#include <folly/portability/GTest.h>
#include <algorithm>
#include <cinttypes>
......@@ -32,6 +27,12 @@
#include <stdexcept>
#include <tuple>
#include <boost/lexical_cast.hpp>
#include <glog/logging.h>
#include <folly/container/Foreach.h>
#include <folly/portability/GTest.h>
using namespace std;
using namespace folly;
......
......@@ -16,9 +16,8 @@
#include <folly/test/DeterministicSchedule.h>
#include <cassert>
#include <algorithm>
#include <cassert>
#include <list>
#include <mutex>
#include <random>
......
......@@ -18,7 +18,7 @@
#include <assert.h>
#include <errno.h>
#include <glog/logging.h>
#include <atomic>
#include <functional>
#include <list>
......@@ -28,6 +28,8 @@
#include <unordered_set>
#include <vector>
#include <glog/logging.h>
#include <folly/ScopeGuard.h>
#include <folly/concurrency/CacheLocality.h>
#include <folly/detail/Futex.h>
......
......@@ -18,13 +18,13 @@
#include <folly/DynamicConverter.h>
#include <folly/FBVector.h>
#include <folly/portability/GTest.h>
#include <algorithm>
#include <map>
#include <vector>
#include <folly/FBVector.h>
#include <folly/portability/GTest.h>
using namespace folly;
using namespace folly::dynamicconverter_detail;
......
......@@ -14,15 +14,14 @@
* limitations under the License.
*/
#include <folly/dynamic.h>
#include <iostream>
#include <folly/dynamic.h>
#include <folly/gen/Base.h>
#include <folly/json.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
#include <iostream>
using folly::dynamic;
using folly::TypeError;
......
......@@ -16,14 +16,14 @@
#include <folly/dynamic.h>
#include <iterator>
#include <glog/logging.h>
#include <folly/Range.h>
#include <folly/json.h>
#include <folly/portability/GTest.h>
#include <iterator>
using folly::dynamic;
using folly::StringPiece;
......
......@@ -15,6 +15,7 @@
*/
#include <folly/memory/EnableSharedFromThis.h>
#include <folly/portability/GTest.h>
using namespace folly;
......
......@@ -15,7 +15,6 @@
*/
#include <folly/lang/Bits.h>
#include <folly/portability/GTest.h>
using namespace folly;
......
......@@ -16,12 +16,12 @@
#include <folly/Exception.h>
#include <folly/experimental/TestUtil.h>
#include <folly/portability/GTest.h>
#include <cstdio>
#include <memory>
#include <folly/experimental/TestUtil.h>
#include <folly/portability/GTest.h>
namespace folly {
namespace test {
......
......@@ -14,10 +14,11 @@
* limitations under the License.
*/
#include <folly/ExceptionWrapper.h>
#include <stdexcept>
#include <folly/Conv.h>
#include <folly/ExceptionWrapper.h>
#include <folly/portability/GMock.h>
#include <folly/portability/GTest.h>
......
......@@ -14,9 +14,10 @@
* limitations under the License.
*/
#include <folly/Executor.h>
#include <atomic>
#include <folly/Executor.h>
#include <folly/portability/GTest.h>
namespace folly {
......
......@@ -15,8 +15,6 @@
*/
#include <folly/Expected.h>
#include <folly/Portability.h>
#include <folly/portability/GTest.h>
#include <algorithm>
#include <iomanip>
......@@ -27,6 +25,9 @@
#include <glog/logging.h>
#include <folly/Portability.h>
#include <folly/portability/GTest.h>
using std::shared_ptr;
using std::unique_ptr;
......
......@@ -14,13 +14,12 @@
* limitations under the License.
*/
#include <folly/File.h>
#include <mutex>
#include <boost/thread/locks.hpp>
#include <glog/logging.h>
#include <folly/File.h>
#include <folly/String.h>
#include <folly/Subprocess.h>
#include <folly/experimental/TestUtil.h>
......
......@@ -15,20 +15,21 @@
*/
#include <folly/FileUtil.h>
#include <folly/detail/FileUtilDetail.h>
#include <folly/experimental/TestUtil.h>
#include <deque>
#if defined(__linux__)
#include <dlfcn.h>
#endif
#include <deque>
#include <glog/logging.h>
#include <folly/Exception.h>
#include <folly/File.h>
#include <folly/Range.h>
#include <folly/String.h>
#include <folly/detail/FileUtilDetail.h>
#include <folly/experimental/TestUtil.h>
#include <folly/portability/GTest.h>
namespace folly {
......
......@@ -18,6 +18,7 @@
// Author: eniebler@fb.com
#include <folly/FixedString.h>
#include <folly/portability/GTest.h>
#define FS(x) ::folly::makeFixedString(x)
......
......@@ -16,6 +16,8 @@
#include <folly/Format.h>
#include <utility>
#include <glog/logging.h>
#include <folly/Benchmark.h>
......@@ -25,8 +27,6 @@
#include <folly/init/Init.h>
#include <folly/json.h>
#include <utility>
using namespace folly;
namespace {
......
......@@ -14,12 +14,11 @@
* limitations under the License.
*/
#include <folly/Format.h>
#include <glog/logging.h>
#include <folly/FBVector.h>
#include <folly/FileUtil.h>
#include <folly/Format.h>
#include <folly/Portability.h>
#include <folly/dynamic.h>
#include <folly/json.h>
......
......@@ -15,11 +15,12 @@
*/
#include <folly/Format.h>
#include <folly/Utility.h>
#include <folly/portability/GTest.h>
#include <string>
#include <folly/Utility.h>
#include <folly/portability/GTest.h>
using namespace folly;
template <class Uint>
......
......@@ -14,17 +14,17 @@
* limitations under the License.
*/
#include <folly/Benchmark.h>
#include <folly/Function.h>
#include <folly/Random.h>
#include <folly/synchronization/detail/InlineFunctionRef.h>
#include <cstdint>
#include <functional>
#include <memory>
#include <tuple>
#include <type_traits>
#include <folly/Benchmark.h>
#include <folly/Function.h>
#include <folly/Random.h>
#include <folly/synchronization/detail/InlineFunctionRef.h>
/**
* ============================================================================
* folly/test/FunctionRefBenchmark.cpp relative time/iter iters/s
......
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