|
proxygen
|
#include <folly/Benchmark.h>#include <folly/Format.h>#include <folly/Range.h>#include <folly/io/Cursor.h>#include <folly/io/IOBufQueue.h>Go to the source code of this file.
Functions | |
| DECLARE_bool (benchmark) | |
| template<class T > | |
| void | runArithmeticBench (int64_t iters) |
| BENCHMARK (write_uint8, iters) | |
| BENCHMARK (write_uint16, iters) | |
| BENCHMARK (write_uint32, iters) | |
| void | runPushBenchmark (int64_t iters, const std::string &str) |
| BENCHMARK (push_64b, iters) | |
| BENCHMARK (push_1024b, iters) | |
| BENCHMARK (append, iters) | |
| void | preallocate_postallocate_bench (int64_t iters, size_t size) |
| BENCHMARK (preallocate_postallocate_1b, iters) | |
| BENCHMARK (preallocate_postallocate_4b, iters) | |
| BENCHMARK (preallocate_postallocate_32b, iters) | |
| BENCHMARK (preallocate_postallocate_256b, iters) | |
| int | main (int argc, char **argv) |
Variables | |
| constexpr size_t | kBenchmarkSize = 4096 |
| BENCHMARK | ( | write_uint8 | , |
| iters | |||
| ) |
Definition at line 41 of file QueueAppenderBenchmark.cpp.
| BENCHMARK | ( | write_uint16 | , |
| iters | |||
| ) |
Definition at line 45 of file QueueAppenderBenchmark.cpp.
| BENCHMARK | ( | write_uint32 | , |
| iters | |||
| ) |
Definition at line 49 of file QueueAppenderBenchmark.cpp.
| BENCHMARK | ( | push_64b | , |
| iters | |||
| ) |
Definition at line 65 of file QueueAppenderBenchmark.cpp.
References BENCHMARK_SUSPEND, folly::data(), runPushBenchmark(), and string.
| BENCHMARK | ( | push_1024b | , |
| iters | |||
| ) |
Definition at line 73 of file QueueAppenderBenchmark.cpp.
References BENCHMARK_SUSPEND, folly::data(), runPushBenchmark(), and string.
| BENCHMARK | ( | append | , |
| iters | |||
| ) |
Definition at line 81 of file QueueAppenderBenchmark.cpp.
References folly::IOBuf::append(), BENCHMARK_SUSPEND, folly::IOBuf::clone(), folly::IOBuf::create(), folly::doNotOptimizeAway(), i, folly::io::QueueAppender::insert(), kBenchmarkSize, and folly::IOBufQueue::move().
| BENCHMARK | ( | preallocate_postallocate_1b | , |
| iters | |||
| ) |
Definition at line 116 of file QueueAppenderBenchmark.cpp.
References preallocate_postallocate_bench().
| BENCHMARK | ( | preallocate_postallocate_4b | , |
| iters | |||
| ) |
Definition at line 120 of file QueueAppenderBenchmark.cpp.
References preallocate_postallocate_bench().
| BENCHMARK | ( | preallocate_postallocate_32b | , |
| iters | |||
| ) |
Definition at line 124 of file QueueAppenderBenchmark.cpp.
References preallocate_postallocate_bench().
| BENCHMARK | ( | preallocate_postallocate_256b | , |
| iters | |||
| ) |
Definition at line 128 of file QueueAppenderBenchmark.cpp.
References preallocate_postallocate_bench().
| DECLARE_bool | ( | benchmark | ) |
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
| void preallocate_postallocate_bench | ( | int64_t | iters, |
| size_t | size | ||
| ) |
Definition at line 100 of file QueueAppenderBenchmark.cpp.
References BENCHMARK_SUSPEND, folly::data(), folly::doNotOptimizeAway(), i, kBenchmarkSize, folly::IOBufQueue::move(), folly::IOBufQueue::postallocate(), folly::IOBufQueue::preallocate(), folly::range(), folly::size(), and string.
Referenced by BENCHMARK().
| void runArithmeticBench | ( | int64_t | iters | ) |
Definition at line 30 of file QueueAppenderBenchmark.cpp.
References folly::doNotOptimizeAway(), i, kBenchmarkSize, folly::IOBufQueue::move(), folly::T, and folly::io::QueueAppender::write().
| void runPushBenchmark | ( | int64_t | iters, |
| const std::string & | str | ||
| ) |
Definition at line 53 of file QueueAppenderBenchmark.cpp.
References folly::doNotOptimizeAway(), i, kBenchmarkSize, folly::IOBufQueue::move(), and folly::io::detail::Writable< Derived >::push().
Referenced by BENCHMARK().
| constexpr size_t kBenchmarkSize = 4096 |
Definition at line 27 of file QueueAppenderBenchmark.cpp.
Referenced by BENCHMARK(), preallocate_postallocate_bench(), runArithmeticBench(), and runPushBenchmark().