proxygen
proxygen::HTTPTransaction::PrioritySample Class Reference

Classes

struct  WeightedAccumulator
 
struct  WeightedValue
 

Public Member Functions

 PrioritySample (HTTPTransaction *tnx)
 
void updateContentionsCount (uint64_t contentions, uint64_t depth)
 
void updateTransactionBytesSent (uint64_t bytes)
 
void updateSessionBytesSheduled (uint64_t bytes)
 
void updateRatio (double ratio)
 
bool isTransactionBytesScheduled () const
 
void getSummary (HTTPTransaction::PrioritySampleSummary &summary) const
 

Private Attributes

HTTPTransactiontnx_
 
WeightedValue contentions_
 
WeightedValue depth_
 
WeightedAccumulator expected_weight_
 
WeightedAccumulator measured_weight_
 
double ratio_
 
bool transactionBytesScheduled_:1
 

Detailed Description

Definition at line 1386 of file HTTPTransaction.cpp.

Constructor & Destructor Documentation

proxygen::HTTPTransaction::PrioritySample::PrioritySample ( HTTPTransaction tnx)
inlineexplicit

Definition at line 1433 of file HTTPTransaction.cpp.

Member Function Documentation

void proxygen::HTTPTransaction::PrioritySample::getSummary ( HTTPTransaction::PrioritySampleSummary summary) const
inline
bool proxygen::HTTPTransaction::PrioritySample::isTransactionBytesScheduled ( ) const
inline

Definition at line 1474 of file HTTPTransaction.cpp.

void proxygen::HTTPTransaction::PrioritySample::updateContentionsCount ( uint64_t  contentions,
uint64_t  depth 
)
inline
void proxygen::HTTPTransaction::PrioritySample::updateRatio ( double  ratio)
inline

Definition at line 1470 of file HTTPTransaction.cpp.

1470  {
1471  ratio_ = ratio;
1472  }
void proxygen::HTTPTransaction::PrioritySample::updateSessionBytesSheduled ( uint64_t  bytes)
inline

Definition at line 1457 of file HTTPTransaction.cpp.

1457  {
1459  expected_weight_.accumulate((ratio_ * bytes) + 0.5, bytes);
1460  if (contentions_.value_) {
1462  } else {
1463  VLOG(5) << "transfer " << bytes
1464  << " session body bytes while contentions count = 0 "
1465  << *tnx_;
1466  }
1468  }
void proxygen::HTTPTransaction::PrioritySample::updateTransactionBytesSent ( uint64_t  bytes)
inline

Definition at line 1444 of file HTTPTransaction.cpp.

1444  {
1447  if (contentions_.value_) {
1449  } else {
1450  VLOG(5) << "transfer " << bytes
1451  << " transaction body bytes while contentions count = 0 "
1452  << *tnx_;
1453  }
1455  }

Member Data Documentation

WeightedValue proxygen::HTTPTransaction::PrioritySample::contentions_
private

Definition at line 1487 of file HTTPTransaction.cpp.

WeightedValue proxygen::HTTPTransaction::PrioritySample::depth_
private

Definition at line 1488 of file HTTPTransaction.cpp.

WeightedAccumulator proxygen::HTTPTransaction::PrioritySample::expected_weight_
private

Definition at line 1489 of file HTTPTransaction.cpp.

WeightedAccumulator proxygen::HTTPTransaction::PrioritySample::measured_weight_
private

Definition at line 1490 of file HTTPTransaction.cpp.

double proxygen::HTTPTransaction::PrioritySample::ratio_
private

Definition at line 1491 of file HTTPTransaction.cpp.

HTTPTransaction* proxygen::HTTPTransaction::PrioritySample::tnx_
private

Definition at line 1486 of file HTTPTransaction.cpp.

bool proxygen::HTTPTransaction::PrioritySample::transactionBytesScheduled_
private

Definition at line 1492 of file HTTPTransaction.cpp.


The documentation for this class was generated from the following file: