ChromeObserver class
          #include <src/taskflow/core/observer.hpp>
        
        observer interface based on Chrome tracing format
Contents
- Reference
 
A tf::
tf::Taskflow taskflow; tf::Executor executor; // insert tasks into taskflow // ... // create a custom observer std::shared_ptr<tf::ChromeObserver> observer = executor.make_observer<tf::ChromeObserver>(); // run the taskflow executor.run(taskflow).wait(); // dump the thread activities to a chrome-tracing format. observer->dump(std::cout);
Base classes
- class ObserverInterface
 - The interface class for creating an executor observer.
 
Public functions
Private functions
- void set_up(size_t num_workers) final
 - constructor-like method to call when the executor observer is fully created
 - void on_entry(WorkerView w, TaskView task_view) final
 - method to call before a worker thread executes a closure
 - void on_exit(WorkerView w, TaskView task_view) final
 - method to call after a worker thread executed a closure
 
Function documentation
              void tf:: ChromeObserver:: set_up(size_t num_workers) final private
            
            constructor-like method to call when the executor observer is fully created
| Parameters | |
|---|---|
| num_workers | the number of the worker threads in the executor | 
              void tf:: ChromeObserver:: on_entry(WorkerView w,
              TaskView task_view) final private
            
            method to call before a worker thread executes a closure
| Parameters | |
|---|---|
| w | an immutable view of this worker thread | 
| task_view | a constant wrapper object to the task | 
              void tf:: ChromeObserver:: on_exit(WorkerView w,
              TaskView task_view) final private
            
            method to call after a worker thread executed a closure
| Parameters | |
|---|---|
| w | an immutable view of this worker thread | 
| task_view | a constant wrapper object to the task |