Create a benchmark for ProducerConsumerQueue
authorBert Maher <bertrand@fb.com>
Mon, 14 Jan 2013 19:18:16 +0000 (11:18 -0800)
committerJordan DeLong <jdelong@fb.com>
Sat, 19 Jan 2013 00:37:59 +0000 (16:37 -0800)
commitc8be994e747526c4928c69ac49dfda803cf613de
tree8f87dc10189a6e36fffa5a646c05f962136aeb07
parentaea0f7108838a5a9ff9d30f82638ed9e4a077601
Create a benchmark for ProducerConsumerQueue

Summary: This is a basic benchmark harness for testing ProducerConsumerQueue, which tests a single producer/consumer pair with and without CPU affinity set.  The change to ProducerConsumerQueue.h (not for committing) tests the effect of cache-aligning the read and write indices to reduce false sharing.

Test Plan: Run the benchmark with the cache alignment (un)commented.

Reviewed By: rituraj@fb.com

FB internal diff: D665948
folly/test/ProducerConsumerQueueBenchmark.cpp [new file with mode: 0644]