proxygen
|
#include <atomic>
#include <memory>
#include <random>
#include <glog/logging.h>
#include <folly/Benchmark.h>
#include <folly/experimental/Bits.h>
Go to the source code of this file.
Functions | |
std::vector< uint8_t > | buffer (kBufferSize+16) |
template<class T > | |
void | benchmarkSet (size_t n, T) |
BENCHMARK_DRAW_LINE () | |
std::atomic< int64_t > | sum (0) |
template<class T > | |
void | benchmarkGet (size_t n, T x) |
int | main (int argc, char *argv[]) |
Variables | |
std::random_device | rd |
const size_t | kBufferSize = 1 << 10 |
BENCHMARK_DRAW_LINE | ( | ) |
Referenced by benchmarkSet().
void benchmarkGet | ( | size_t | n, |
T | x | ||
) |
Definition at line 80 of file BitsBenchmark.cpp.
References BENCHMARK_NAMED_PARAM, BENCHMARK_RELATIVE_NAMED_PARAM, benchmarkSet(), buffer(), folly::doNotOptimizeAway(), folly::Bits< T, Traits >::get(), i, int16_t, int32_t, int64_t, kBufferSize, s, folly::size(), T, folly::detail::distributed_mutex::time(), uint16_t, uint32_t, and uint64_t.
void benchmarkSet | ( | size_t | n, |
T | |||
) |
Definition at line 32 of file BitsBenchmark.cpp.
References BENCHMARK_DRAW_LINE(), BENCHMARK_NAMED_PARAM, BENCHMARK_RELATIVE_NAMED_PARAM, BENCHMARK_SUSPEND, buffer(), folly::doNotOptimizeAway(), folly::findLastSet(), i, int16_t, int32_t, int64_t, k, kBufferSize, max, min, rd, folly::Bits< T, Traits >::set(), folly::size(), sum(), T, uint16_t, uint32_t, uint64_t, value, and values().
Referenced by benchmarkGet().
std::vector<uint8_t> buffer | ( | kBufferSize+ | 16 | ) |
Referenced by folly::io::addOutputBuffer(), ReadCallback::Buffer::allocate(), folly::ReadCallback::Buffer::allocate(), proxygen::QPACKEncoder::allowVulnerable(), append(), folly::gen::detail::Window::Generator< Value, Source, StorageType >::apply(), BENCHMARK_RELATIVE(), benchmarkGet(), benchmarkSet(), folly::small_vector< Value, RequestedMaxInline, PolicyA, PolicyB, PolicyC >::Data::buffer(), folly::io::test::compressSome(), proxygen::StructuredHeadersStandardTest::decode32Block(), folly::io::StreamCodec::doCompress(), folly::io::StreamCodec::doUncompress(), estimateQuantile(), folly::estimateSpaceNeeded(), folly::CustomLogFormatter::formatMessage(), folly::GlogStyleFormatter::formatMessage(), ReadCallback::Buffer::free(), folly::ReadCallback::Buffer::free(), folly::fibers::Fiber::LocalData::freeHeapBuffer(), proxygen::HTTPArchive::fromFile(), proxygen::HTTPArchive::fromPublicFile(), folly::fibers::Fiber::LocalData::get(), folly::getFileAsBuf(), testing::internal::GetThreadCount(), folly::AsyncServerSocket::handlerReady(), folly::IOBuf::headroom(), main(), merge(), mergeDigests(), read_all(), testing::internal::ReadEntireFile(), proxygen::readFileToIOBuf(), readThread(), ReadCallback::Buffer::reset(), folly::ReadCallback::Buffer::reset(), folly::IPAddressV6::str(), stringPrintfOutputSize(), StringUnsplit_Gen(), TEST(), folly::io::test::TEST(), TEST_F(), folly::io::test::TEST_P(), testConcatenation(), testFreeFn(), folly::toAppend(), u2aAppendClassicBM(), u2aAppendFollyBM(), folly::io::test::uncompressSome(), folly::detail::writeIntegerString(), folly::AsyncFileWriter::writeMessage(), and folly::LogWriter::~LogWriter().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 118 of file BitsBenchmark.cpp.
References folly::runBenchmarks(), and sum().
std::atomic<int64_t> sum | ( | 0 | ) |
Referenced by folly::test::atomic_notify_one(), AnnotatedAtomicCounter< T >::auxCheck(), bench(), BENCHMARK(), benchmarkSet(), folly::BucketedTimeSeries< VT, CT >::countRate(), folly::detail::crc_sw(), folly::detail::digits_to(), enq_deq_test(), folly::f14::expectedProbe(), folly::test::fc_test(), lifo_test(), main(), folly::RelaxedConcurrentPriorityQueue< T, MayBlock, SupportsSize, PopBatch, ListTargetSize, Mutex, Atom >::mergeDown(), folly::f14::operator<<(), producer_consumer_test(), producerConsumerBench(), folly::BucketedTimeSeries< VT, CT >::rate(), runBench(), runFairness(), runNeverFailTest(), runTryEnqDeqTest(), singleThreadTest(), testing::internal::SumOverTestCaseList(), TEST(), folly::test::TEST(), test(), folly::TEST(), TEST_P(), and throughtput_test().
const size_t kBufferSize = 1 << 10 |
Definition at line 28 of file BitsBenchmark.cpp.
Referenced by benchmarkGet(), benchmarkSet(), and folly::fibers::Fiber::LocalData::getSlow().
std::random_device rd |
Definition at line 26 of file BitsBenchmark.cpp.
Referenced by BENCHMARK(), benchmarkSet(), and TEST().