docs/classtf_1_1ChromeObserver.html
class to create an observer based on Chrome tracing format
A tf::ChromeObserver inherits tf::ObserverInterface and defines methods to dump the observed thread activities into a format that can be visualized through Chrome Tracing.
tf::Taskflow taskflow;tf::Executor executor;// insert tasks into taskflow// ...// create a custom observerstd::shared\_ptr\<tf::ChromeObserver\> observer = executor.make\_observer\<tf::ChromeObserver\>();// run the taskflowexecutor.run(taskflow).wait();// dump the thread activities to a chrome-tracing format.observer-\>dump(std::cout);
class ObserverInterfaceclass to derive an executor observer
void dump(std::ostream& ostream) constdumps the timelines into a Chrome Tracing format through an output streamauto dump() const -> std::stringdumps the timelines into a Chrome Tracing formatvoid clear()clears the timeline dataauto num_tasks() const -> size_tqueries the number of tasks observed
void set_up(size_t num_workers) finalconstructor-like method to call when the executor observer is fully createdvoid on_entry(WorkerView wv, TaskView task_view) finalmethod to call before a worker thread executes a closurevoid on_exit(WorkerView wv, TaskView task_view) finalmethod to call after a worker thread executed a closure
constructor-like method to call when the executor observer is fully created
| Parameters |
|---|
| num_workers |
method to call before a worker thread executes a closure
| Parameters |
|---|
| wv |
| task_view |
method to call after a worker thread executed a closure
| Parameters |
|---|
| wv |
| task_view |