MCPcopy Create free account
hub / github.com/bytedance/bolt / doFetch

Method doFetch

bolt/exec/tests/MultiFragmentTest.cpp:2220–2239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2218class DataFetcher {
2219 public:
2220 DataFetcher(const std::string& taskId, int32_t destination, int64_t maxBytes)
2221 : taskId_{taskId}, destination_{destination}, maxBytes_{maxBytes} {}
2222
2223 /// Starts fetching data for the task and destination specified in the
2224 /// constructor. Returns a future that gets completes once all the data has
2225 /// been fetched.
2226 ContinueFuture fetch() {
2227 auto [p, f] = makeBoltContinuePromiseContract("DataFetcher");
2228 promise_ = std::move(p);
2229 doFetch(kInitialSequence);
2230 return std::move(f);
2231 }
2232
2233 struct Stats {
2234 /// Number of possibly multi-page packets received.
2235 int32_t numPackets;
2236 /// Number of pages received. Includes the last null page.
2237 int32_t numPages;
2238 /// Total number of bytes received across all pages.
2239 int64_t totalBytes;
2240
2241 /// Average number of bytes per packet.
2242 int64_t averagePacketBytes() const {

Callers

nothing calls this directly

Calls 5

getDataMethod · 0.45
sizeMethod · 0.45
acknowledgeMethod · 0.45
deleteResultsMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected