proxygen
|
#include <CompressionSimulator.h>
Public Member Functions | |
CompressionSimulator (SimParams p) | |
bool | readInputFromFileAndSchedule (const std::string &filename) |
void | run () |
void | flushSchemePackets (CompressionScheme *scheme) |
void | flushPacket (CompressionScheme *scheme) |
Private Member Functions | |
void | flushRequests (CompressionScheme *scheme) |
void | setupRequest (uint16_t seqn, HTTPMessage &&msg, std::chrono::milliseconds encodeDelay) |
CompressionScheme * | getScheme (folly::StringPiece host) |
std::unique_ptr< CompressionScheme > | makeScheme () |
std::pair< FrameFlags, std::unique_ptr< folly::IOBuf > > | encode (CompressionScheme *scheme, bool newPacket, uint16_t seqn) |
void | decodePacket (CompressionScheme *scheme, std::list< CompressionScheme::BlockInfo > &blocks) |
void | decode (CompressionScheme *scheme, FrameFlags flags, std::unique_ptr< folly::IOBuf > encodedReq, SimStreamingCallback &cb) |
void | scheduleEvent (folly::Function< void()> f, std::chrono::milliseconds ms) |
void | sendAck (CompressionScheme *scheme, std::unique_ptr< CompressionScheme::Ack > ack) |
void | recvAck (CompressionScheme *scheme, std::unique_ptr< CompressionScheme::Ack > ack) |
std::chrono::milliseconds | deliveryDelay () |
std::chrono::milliseconds | rtt () |
std::chrono::milliseconds | one_half_rtt () |
std::chrono::milliseconds | rxmitDelay () |
bool | loss () |
bool | delayed () |
std::chrono::milliseconds | extraDelay () |
uint32_t | minOOOThresh () |
Private Attributes | |
SimParams | params_ |
std::vector< proxygen::HTTPMessage > | requests_ |
folly::EventBase | eventBase_ |
std::unordered_map< std::string, std::unique_ptr< CompressionScheme > > | domains_ |
std::vector< SimStreamingCallback > | callbacks_ |
folly::Random::DefaultGenerator | rng_ |
SimStats | stats_ |
Definition at line 23 of file CompressionSimulator.h.
|
inlineexplicit |
Definition at line 25 of file CompressionSimulator.h.
References decode(), decodePacket(), delayed(), deliveryDelay(), encode(), extraDelay(), f, flushPacket(), flushRequests(), flushSchemePackets(), getScheme(), loss(), makeScheme(), minOOOThresh(), one_half_rtt(), readInputFromFileAndSchedule(), recvAck(), rtt(), run(), rxmitDelay(), scheduleEvent(), sendAck(), setupRequest(), string, uint16_t, and uint32_t.
|
private |
Definition at line 304 of file CompressionSimulator.cpp.
References proxygen::compress::CompressionScheme::decode(), and folly::gen::move.
Referenced by CompressionSimulator().
|
private |
Definition at line 311 of file CompressionSimulator.cpp.
References fizz::decode(), and folly::gen::move.
Referenced by CompressionSimulator().
|
private |
Definition at line 390 of file CompressionSimulator.cpp.
Referenced by CompressionSimulator().
|
private |
Definition at line 352 of file CompressionSimulator.cpp.
Referenced by CompressionSimulator().
|
private |
Definition at line 284 of file CompressionSimulator.cpp.
References proxygen::compress::CompressionScheme::encode(), proxygen::HTTP_HEADER_HOST, folly::gen::move, and proxygen::compress::prepareMessageForCompression().
Referenced by CompressionSimulator().
|
private |
Definition at line 394 of file CompressionSimulator.cpp.
References uint32_t.
Referenced by CompressionSimulator().
void proxygen::compress::CompressionSimulator::flushPacket | ( | CompressionScheme * | scheme | ) |
Definition at line 184 of file CompressionSimulator.cpp.
References proxygen::compress::CompressionScheme::decodeDelay, folly::gen::move, proxygen::compress::CompressionScheme::packetBlocks, and proxygen::compress::CompressionScheme::packetBytes.
Referenced by CompressionSimulator().
|
private |
Definition at line 103 of file CompressionSimulator.cpp.
References folly::gen::move, proxygen::compress::CompressionScheme::packetIndices, and proxygen::compress::CompressionScheme::prev.
Referenced by CompressionSimulator().
void proxygen::compress::CompressionSimulator::flushSchemePackets | ( | CompressionScheme * | scheme | ) |
Definition at line 200 of file CompressionSimulator.cpp.
References proxygen::compress::CompressionScheme::decodeDelay, proxygen::compress::CompressionScheme::encodedBlocks, max, min, proxygen::compress::CompressionScheme::packetBlocks, and proxygen::compress::CompressionScheme::packetBytes.
Referenced by CompressionSimulator().
|
private |
Definition at line 250 of file CompressionSimulator.cpp.
References folly::Range< Iter >::endsWith(), folly::Range< Iter >::find(), folly::INFO, folly::gen::move, and folly::Range< Iter >::str().
Referenced by CompressionSimulator().
|
private |
Definition at line 386 of file CompressionSimulator.cpp.
Referenced by CompressionSimulator().
|
private |
Definition at line 270 of file CompressionSimulator.cpp.
References folly::FATAL.
Referenced by CompressionSimulator().
|
private |
Definition at line 399 of file CompressionSimulator.cpp.
Referenced by CompressionSimulator().
|
private |
Definition at line 377 of file CompressionSimulator.cpp.
Referenced by CompressionSimulator().
bool proxygen::compress::CompressionSimulator::readInputFromFileAndSchedule | ( | const std::string & | filename | ) |
Definition at line 36 of file CompressionSimulator.cpp.
References a, b, proxygen::ERROR, folly::exceptionStr(), folly::gen::fromFile(), proxygen::HTTPMessage::getStartTime(), proxygen::millisecondsBetween(), folly::gen::move, proxygen::HTTPArchive::requests, and uint16_t.
Referenced by CompressionSimulator(), and main().
|
private |
Definition at line 347 of file CompressionSimulator.cpp.
References folly::gen::move, and proxygen::compress::CompressionScheme::recvAck().
Referenced by CompressionSimulator().
|
private |
Definition at line 373 of file CompressionSimulator.cpp.
Referenced by CompressionSimulator().
void proxygen::compress::CompressionSimulator::run | ( | ) |
Definition at line 73 of file CompressionSimulator.cpp.
References folly::INFO, and uint32_t.
Referenced by CompressionSimulator(), and main().
|
private |
Definition at line 381 of file CompressionSimulator.cpp.
References uint32_t.
Referenced by CompressionSimulator().
|
private |
Definition at line 329 of file CompressionSimulator.cpp.
References f, and folly::gen::move.
Referenced by CompressionSimulator().
|
private |
Definition at line 334 of file CompressionSimulator.cpp.
References a, and folly::gen::move.
Referenced by CompressionSimulator().
|
private |
Definition at line 137 of file CompressionSimulator.cpp.
References proxygen::HTTP_HEADER_HOST, and value.
Referenced by CompressionSimulator().
|
private |
Definition at line 70 of file CompressionSimulator.h.
|
private |
Definition at line 69 of file CompressionSimulator.h.
|
private |
Definition at line 67 of file CompressionSimulator.h.
|
private |
Definition at line 65 of file CompressionSimulator.h.
|
private |
Definition at line 66 of file CompressionSimulator.h.
|
private |
Definition at line 71 of file CompressionSimulator.h.
|
private |
Definition at line 73 of file CompressionSimulator.h.