#include <folly/ProducerConsumerQueue.h>
-#include <pthread.h>
-
#include <cstdio>
#include <iostream>
#include <thread>
#include <folly/Benchmark.h>
#include <folly/portability/GFlags.h>
+#include <folly/portability/PThread.h>
#include <folly/stats/Histogram.h>
#include <folly/stats/Histogram-defs.h>
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),
int cpu1_;
};
-template<class QueueType>
+template <class QueueType>
struct LatencyTest {
explicit LatencyTest(size_t size, int iters, int cpu0, int cpu1)
: queue_(size),
BENCHMARK_PARAM(BM_ProducerConsumerAffinity, 1048574);
BENCHMARK_PARAM(BM_ProducerConsumerLatency, 1048574);
-}
+} // namespace
int main(int argc, char** argv) {
google::InitGoogleLogging(argv[0]);