proxygen
|
#include <folly/io/IOBuf.h>
#include <folly/Benchmark.h>
#include <folly/Format.h>
#include <folly/Range.h>
#include <folly/io/Cursor.h>
Go to the source code of this file.
Functions | |
DECLARE_bool (benchmark) | |
template<class CursClass > | |
void | runBenchmark () |
BENCHMARK (rwPrivateCursorBenchmark, iters) | |
BENCHMARK (rwUnshareCursorBenchmark, iters) | |
BENCHMARK (cursorBenchmark, iters) | |
BENCHMARK (skipBenchmark, iters) | |
BENCHMARK (cloneBenchmark, iters) | |
BENCHMARK (read, iters) | |
BENCHMARK (readSlow, iters) | |
bool | prefixBaseline (Cursor &c, const std::array< uint8_t, 4 > &expected) |
bool | prefix (Cursor &c, uint32_t expected) |
BENCHMARK (prefixBaseline, iters) | |
BENCHMARK_RELATIVE (prefix, iters) | |
int | main (int argc, char **argv) |
Variables | |
int | benchmark_size = 1000 |
unique_ptr< IOBuf > | iobuf_benchmark |
unique_ptr< IOBuf > | iobuf_read_benchmark |
BENCHMARK | ( | rwPrivateCursorBenchmark | , |
iters | |||
) |
Definition at line 47 of file IOBufCursorBenchmark.cpp.
BENCHMARK | ( | rwUnshareCursorBenchmark | , |
iters | |||
) |
Definition at line 53 of file IOBufCursorBenchmark.cpp.
BENCHMARK | ( | cursorBenchmark | , |
iters | |||
) |
Definition at line 59 of file IOBufCursorBenchmark.cpp.
References benchmark_size, c, i, and uint8_t.
BENCHMARK | ( | skipBenchmark | , |
iters | |||
) |
Definition at line 68 of file IOBufCursorBenchmark.cpp.
References benchmark_size, c, and i.
BENCHMARK | ( | cloneBenchmark | , |
iters | |||
) |
Definition at line 78 of file IOBufCursorBenchmark.cpp.
References benchmark_size, c, and i.
BENCHMARK | ( | read | , |
iters | |||
) |
Definition at line 88 of file IOBufCursorBenchmark.cpp.
References benchmark_size, c, folly::doNotOptimizeAway(), i, uint8_t, and val.
BENCHMARK | ( | readSlow | , |
iters | |||
) |
Definition at line 98 of file IOBufCursorBenchmark.cpp.
References benchmark_size, c, folly::doNotOptimizeAway(), i, folly::size(), uint16_t, and val.
BENCHMARK | ( | prefixBaseline | , |
iters | |||
) |
Definition at line 125 of file IOBufCursorBenchmark.cpp.
References benchmark_size, c, folly::IOBuf::CREATE, folly::doNotOptimizeAway(), i, prefix(), and prefixBaseline().
BENCHMARK_RELATIVE | ( | prefix | , |
iters | |||
) |
Definition at line 138 of file IOBufCursorBenchmark.cpp.
References benchmark_size, c, folly::IOBuf::CREATE, folly::doNotOptimizeAway(), i, and prefix().
DECLARE_bool | ( | benchmark | ) |
int main | ( | int | argc, |
char ** | argv | ||
) |
============================================================================
rwPrivateCursorBenchmark 1.01us 985.85K rwUnshareCursorBenchmark 1.01us 986.70K cursorBenchmark 4.77us 209.61K skipBenchmark 4.78us 209.42K cloneBenchmark 26.65us 37.52K read 4.35us 230.07K readSlow 5.45us 183.48K prefixBaseline 6.44us 155.24K
Definition at line 166 of file IOBufCursorBenchmark.cpp.
References folly::IOBuf::append(), benchmark_size, folly::IOBuf::create(), i, folly::gen::move, folly::IOBuf::prependChain(), and folly::runBenchmarks().
Definition at line 117 of file IOBufCursorBenchmark.cpp.
References folly::io::detail::CursorBase< Derived, BufType >::tryReadLE(), and uint32_t.
Referenced by testing::gmock_generated_actions_test::ACTION_P2(), folly::gen::detail::SplitStringSource< DelimiterType >::apply(), BENCHMARK(), BENCHMARK_RELATIVE(), testing::internal::CodeLocation::CodeLocation(), testing::ContainsRegex(), testing::gmock_matchers_test::EMString(), folly::json::escapeStringImpl(), folly::exception_tracer::getCurrentExceptions(), folly::IPAddressV4::longestCommonPrefix(), folly::IPAddressV6::longestCommonPrefix(), testing::internal::BoundSecondMatcher< Tuple2Matcher, Second >::Impl< T >::MatchAndExplain(), testing::gmock_matchers_test::MATCHER_P(), message_for_terminate_with(), folly::gen::StreamSplitter< Callback >::operator()(), folly::operator<(), ReadStats::parseMessage(), testing::gmock_generated_actions_test::SubstractAction::Perform(), folly::SocketAddress::prefixMatch(), testing::internal::PrintOnOneLine(), testing::gtest_printers_test::PrintPointer(), TEST(), testing::gmock_matchers_test::TEST_F(), folly::io::test::TEST_P(), testing::gmock_matchers_test::FloatingPointNearTest< RawType >::TestNearMatches(), folly::toSubprocessSpawnErrorMessage(), folly::hash::SpookyHashV1::Update(), folly::hash::SpookyHashV2::Update(), and vprintfCheck().
Definition at line 109 of file IOBufCursorBenchmark.cpp.
References folly::io::detail::CursorBase< Derived, BufType >::pullAtMost().
Referenced by BENCHMARK().
void runBenchmark | ( | ) |
Definition at line 39 of file IOBufCursorBenchmark.cpp.
References benchmark_size, c, i, and uint8_t.
int benchmark_size = 1000 |
Definition at line 33 of file IOBufCursorBenchmark.cpp.
Referenced by BENCHMARK(), BENCHMARK_RELATIVE(), main(), and runBenchmark().
unique_ptr<IOBuf> iobuf_benchmark |
Definition at line 34 of file IOBufCursorBenchmark.cpp.
unique_ptr<IOBuf> iobuf_read_benchmark |
Definition at line 36 of file IOBufCursorBenchmark.cpp.