Futex::futexWait returns FutexResult
[folly.git] / folly / test / ProducerConsumerQueueBenchmark.cpp
index d37ac911b8470ac754c036169947895f82cb4165..a7ce363fa4825cc8109ed50493c37f23c79287ac 100644 (file)
 
 // @author: Bert Maher <bertrand@fb.com>
 
-#include <thread>
+#include <folly/ProducerConsumerQueue.h>
+
+#include <cstdio>
 #include <iostream>
-#include <stdio.h>
-#include <pthread.h>
+#include <thread>
+
+#include <glog/logging.h>
 
 #include <folly/Benchmark.h>
-#include <folly/ProducerConsumerQueue.h>
 #include <folly/portability/GFlags.h>
+#include <folly/portability/PThread.h>
 #include <folly/stats/Histogram.h>
 #include <folly/stats/Histogram-defs.h>
-#include <glog/logging.h>
 
 namespace {
 
@@ -38,7 +40,7 @@ typedef ProducerConsumerQueue<ThroughputType> ThroughputQueueType;
 typedef unsigned long LatencyType;
 typedef ProducerConsumerQueue<LatencyType> LatencyQueueType;
 
-template<class QueueType>
+template <class QueueType>
 struct ThroughputTest {
   explicit ThroughputTest(size_t size, int iters, int cpu0, int cpu1)
   : queue_(size),
@@ -84,7 +86,7 @@ struct ThroughputTest {
   int cpu1_;
 };
 
-template<class QueueType>
+template <class QueueType>
 struct LatencyTest {
   explicit LatencyTest(size_t size, int iters, int cpu0, int cpu1)
   : queue_(size),
@@ -238,7 +240,7 @@ BENCHMARK_PARAM(BM_ProducerConsumer, 1048574);
 BENCHMARK_PARAM(BM_ProducerConsumerAffinity, 1048574);
 BENCHMARK_PARAM(BM_ProducerConsumerLatency, 1048574);
 
-}
+} // namespace
 
 int main(int argc, char** argv) {
   google::InitGoogleLogging(argv[0]);