PullSession Class
Fluent builder for the common "collect samples until target/stall" workflow. More...
Declaration
Included Headers
Friends Index
| class | GraphRun |
Private Constructors Index
| PullSession (GraphRun *run, const std::vector< Output > *outputs, std::vector< NodeId > output_nodes, GraphRunStats *stats) | |
Public Member Functions Index
| PullSession & | per_stream_target (int n) |
|
Stop once each tracked stream has produced this many samples. More... | |
| PullSession & | stall_after_ms (int ms) |
|
Stop after this many ms with no progress (stall detection). More... | |
| PullSession & | timeout_ms (int ms) |
|
Per-poll timeout (ms). More... | |
| PullSession & | max_runtime_ms (int ms) |
|
Hard wall-clock cap (ms) on the entire session. More... | |
| PullSession & | expect_streams (std::vector< std::string > ids) |
|
Limit tracking to these stream-ids (and treat anything else as unexpected). More... | |
| PullSession & | on_sample (std::function< void(const Sample &, NodeId)> cb) |
|
Callback fired on every successfully pulled sample. More... | |
| GraphRunStats & | stats () |
|
Live reference to the stats collector this session writes to. More... | |
| void | run () |
|
Execute the configured pull loop. Blocks until done/stall/max-runtime. More... | |
Private Member Attributes Index
| GraphRun * | run_ = nullptr |
| const std::vector< Output > * | outputs_ = nullptr |
| std::vector< NodeId > | output_nodes_ |
| GraphRunStats * | stats_ = nullptr |
| GraphRunPullOptions | opt_ |
| std::unordered_set< std::string > | expected_ |
| std::unordered_set< std::string > | unknown_ |
| bool | saw_empty_stream_id_ = false |
| std::function< void(const Sample &, NodeId)> | on_sample_ |
Description
Fluent builder for the common "collect samples until target/stall" workflow.
Configure with chainable setters, then call run(). The session pulls from the configured outputs until per-stream targets are met, the runtime stalls, or the max-runtime cap is hit.
Definition at line 269 of file GraphRun.h.
Private Constructors
PullSession()
|
Definition at line 290 of file GraphRun.h.
Public Member Functions
expect_streams()
|
Limit tracking to these stream-ids (and treat anything else as unexpected).
Definition at line 280 of file GraphRun.h.
max_runtime_ms()
|
Hard wall-clock cap (ms) on the entire session.
Definition at line 278 of file GraphRun.h.
on_sample()
|
Callback fired on every successfully pulled sample.
Definition at line 282 of file GraphRun.h.
per_stream_target()
|
Stop once each tracked stream has produced this many samples.
Definition at line 272 of file GraphRun.h.
run()
|
Execute the configured pull loop. Blocks until done/stall/max-runtime.
Definition at line 286 of file GraphRun.h.
stall_after_ms()
|
Stop after this many ms with no progress (stall detection).
Definition at line 274 of file GraphRun.h.
stats()
|
Live reference to the stats collector this session writes to.
Definition at line 284 of file GraphRun.h.
timeout_ms()
|
Per-poll timeout (ms).
Definition at line 276 of file GraphRun.h.
Private Member Attributes
expected_
|
Definition at line 298 of file GraphRun.h.
on_sample_
|
Definition at line 301 of file GraphRun.h.
opt_
|
Definition at line 297 of file GraphRun.h.
output_nodes_
|
Definition at line 295 of file GraphRun.h.
outputs_
|
Definition at line 294 of file GraphRun.h.
run_
|
Definition at line 293 of file GraphRun.h.
saw_empty_stream_id_
|
Definition at line 300 of file GraphRun.h.
stats_
|
Definition at line 296 of file GraphRun.h.
unknown_
|
Definition at line 299 of file GraphRun.h.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.