10 size_t totalBytes = m_usedBytes + m_wastedBytes;
11 float goodFrac_pct = totalBytes > 0 ? m_usedBytes/(totalBytes*100.) : 0;
12 BUFLOG(
"XrdCephReadVBasic: Summary: "
13 <<
" Used: " << m_usedBytes <<
" Wasted: " << m_wastedBytes <<
" goodFrac: "
20 std::vector<ExtentHolder> outputs;
24 ExtentContainer::const_iterator it_l = extentsIn.begin();
25 ExtentContainer::const_iterator it_r = extentsIn.begin();
26 ExtentContainer::const_iterator it_end = extentsIn.end();
29 if ((it_end->end() - it_l->begin()) <=
m_minSize) {
31 outputs.push_back(tmp);
32 BUFLOG(
"XrdCephReadVBasic: Combine all extents: "
34 << it_l->begin() <<
" " << it_end->end() );
38 size_t wastedBytes(0);
41 while (it_r != it_end)
47 while (it_r != it_end) {
48 if ((it_r->end() - it_l->begin()) >
m_maxSize)
break;
53 outputs.push_back(tmp);
57 m_usedBytes += usedBytes;
58 m_wastedBytes += wastedBytes;
59 BUFLOG(
"XrdCephReadVBasic: In size: " << extentsHolderInput.
size() <<
" "
60 << extentsHolderInput.
extents().size() <<
" " << outputs.size() <<
" "
61 <<
" useful bytes: " << usedBytes <<
" wasted bytes:" << wastedBytes);
Designed to hold individual extents, but itself provide Extent-like capabilities Useful in cases of c...
size_t bytesContained() const
size_t size() const
number of extent elements
void push_back(const Extent &in)
size_t bytesMissing() const
const ExtentContainer & extents() const
virtual ~XrdCephReadVBasic()
virtual std::vector< ExtentHolder > convert(const ExtentHolder &extentsHolderInput) override
Take in a set of extents representing the readV requests. return a vector of each combined read reque...
is a simple implementation of IXrdCephBufferData using std::vector<char> representation for the buffe...
std::vector< Extent > ExtentContainer
Container defintion for Extents Typedef to provide a container of extents as a simple stl vector cont...