Lines Matching refs:snapshot
61 * copies snapshot of reader's fifo buffer into its own buffer
63 * sets snapshot.begin() and .end() iterators to boundaries of valid entries
73 * calls dump(int, size_t, Snapshot)
74 * NBLog::Reader::dump(int, size, snapshot)
75 * iterates through snapshot's events and switches based on their type
808 std::unique_ptr<NBLog::Reader::Snapshot> NBLog::Reader::getSnapshot()
811 return std::unique_ptr<NBLog::Reader::Snapshot>(new Snapshot());
823 return std::unique_ptr<NBLog::Reader::Snapshot>(new Snapshot());
826 std::unique_ptr<Snapshot> snapshot(new Snapshot(availToRead));
827 memcpy(snapshot->mData, (const char *) mFifo->buffer() + iovec[0].mOffset, iovec[0].mLength);
829 memcpy(snapshot->mData + (iovec[0].mLength),
839 const uint8_t *back = snapshot->mData + availToRead;
840 const uint8_t *front = snapshot->mData;
846 snapshot->mEnd = snapshot->mBegin = EntryIterator(front);
848 // end of snapshot points to after last END_FMT entry
849 snapshot->mEnd = EntryIterator(lastEnd).next();
852 const uint8_t *firstStartTmp = snapshot->mEnd;
859 snapshot->mBegin = snapshot->mEnd;
861 snapshot->mBegin = EntryIterator(firstStart);
866 mFifoReader->release(snapshot->mEnd - front);
868 snapshot->mLost = lost;
869 return snapshot;
875 void NBLog::Reader::dump(int fd, size_t indent, NBLog::Reader::Snapshot &snapshot)
884 size_t lost = snapshot.lost() + (snapshot.begin() - EntryIterator(snapshot.data()));
892 for (auto entry = snapshot.begin(); entry != snapshot.end();) {
933 // get a snapshot, dump it
934 std::unique_ptr<Snapshot> snap = getSnapshot();
1102 // composed by a timestamp and the index of the snapshot where the timestamp came from
1124 std::vector<std::unique_ptr<NBLog::Reader::Snapshot>> snapshots(nLogs);