proxygen
|
Classes | |
struct | DevNullPiper |
struct | Job |
Typedefs | |
using | ValueT = size_t |
using | ResultT = std::string |
using | DispatchFunctionT = folly::Function< std::vector< ResultT >(std::vector< ValueT > &&)> |
Enumerations | |
enum | DispatchProblem { DispatchProblem::None, DispatchProblem::PreprocessThrows, DispatchProblem::DuplicateDispatch } |
Functions | |
ResultT | processSingleInput (ValueT &&input) |
std::vector< ResultT > | userDispatchFunc (std::vector< ValueT > &&inputs) |
void | createJobs (AtomicBatchDispatcher< ValueT, ResultT > &atomicBatchDispatcher, std::vector< Job > &jobs, size_t count) |
void | dispatchJobs (FiberManager &executor, std::vector< Job > &jobs, std::vector< folly::Optional< folly::Future< ResultT >>> &results, DispatchProblem dispatchProblem=DispatchProblem::None, size_t problemIndex=size_t(-1)) |
void | validateResult (std::vector< folly::Optional< folly::Future< ResultT >>> &results, size_t i) |
template<typename TException > | |
void | validateResults (std::vector< folly::Optional< folly::Future< ResultT >>> &results, size_t expectedNumResults) |
Variables | |
struct AtomicBatchDispatcherTesting::DevNullPiper | devNullPiper |
using AtomicBatchDispatcherTesting::DispatchFunctionT = typedef folly::Function<std::vector<ResultT>(std::vector<ValueT>&&)> |
Definition at line 1771 of file FibersTest.cpp.
using AtomicBatchDispatcherTesting::ResultT = typedef std::string |
Definition at line 1769 of file FibersTest.cpp.
using AtomicBatchDispatcherTesting::ValueT = typedef size_t |
Definition at line 1768 of file FibersTest.cpp.
|
strong |
Enumerator | |
---|---|
None | |
PreprocessThrows | |
DuplicateDispatch |
Definition at line 1838 of file FibersTest.cpp.
void AtomicBatchDispatcherTesting::createJobs | ( | AtomicBatchDispatcher< ValueT, ResultT > & | atomicBatchDispatcher, |
std::vector< Job > & | jobs, | ||
size_t | count | ||
) |
Definition at line 1828 of file FibersTest.cpp.
References count, folly::fibers::AtomicBatchDispatcher< InputT, ResultT >::getToken(), and i.
Referenced by TEST().
void AtomicBatchDispatcherTesting::dispatchJobs | ( | FiberManager & | executor, |
std::vector< Job > & | jobs, | ||
std::vector< folly::Optional< folly::Future< ResultT >>> & | results, | ||
DispatchProblem | dispatchProblem = DispatchProblem::None , |
||
size_t | problemIndex = size_t(-1) |
||
) |
Definition at line 1844 of file FibersTest.cpp.
References folly::fibers::FiberManager::add(), EXPECT_THROW, EXPECT_TRUE, i, AtomicBatchDispatcherTesting::Job::input, folly::gen::move, OUTPUT_TRACE, AtomicBatchDispatcherTesting::Job::preprocess(), and AtomicBatchDispatcherTesting::Job::token.
Referenced by TEST().
Definition at line 1814 of file FibersTest.cpp.
References folly::gen::move.
Referenced by userDispatchFunc(), and validateResults().
std::vector<ResultT> AtomicBatchDispatcherTesting::userDispatchFunc | ( | std::vector< ValueT > && | inputs | ) |
Definition at line 1818 of file FibersTest.cpp.
References i, folly::gen::move, and processSingleInput().
Referenced by TEST().
void AtomicBatchDispatcherTesting::validateResult | ( | std::vector< folly::Optional< folly::Future< ResultT >>> & | results, |
size_t | i | ||
) |
Definition at line 1884 of file FibersTest.cpp.
References i, and OUTPUT_TRACE.
Referenced by validateResults().
void AtomicBatchDispatcherTesting::validateResults | ( | std::vector< folly::Optional< folly::Future< ResultT >>> & | results, |
size_t | expectedNumResults | ||
) |
Definition at line 1897 of file FibersTest.cpp.
References EXPECT_EQ, EXPECT_NO_THROW, EXPECT_THROW, i, folly::gen::move, processSingleInput(), validateResult(), and folly::value().
Referenced by TEST().
struct AtomicBatchDispatcherTesting::DevNullPiper AtomicBatchDispatcherTesting::devNullPiper |
Referenced by AtomicBatchDispatcherTesting::DevNullPiper::operator<<().