tf::ChromeObserver
tf::ObserverInterface
taskflow/core/observer.hpp
tf::ChromeObserver::Segment
tf::ChromeObserver::Timeline
class friend class Executor Executor tf::ChromeObserver::Executor Executor
Timeline Timeline tf::ChromeObserver::_timeline _timeline tf::ChromeObserver::_timeline
void void tf::ChromeObserver::dump (std::ostream &ostream) const dump tf::ChromeObserver::dump std::ostream & ostream

dumps the timelines into a Chrome Tracing format through an output stream

std::string std::string tf::ChromeObserver::dump () const dump tf::ChromeObserver::dump

dumps the timelines into a Chrome Tracing format

void void tf::ChromeObserver::clear () clear tf::ChromeObserver::clear

clears the timeline data

size_t size_t tf::ChromeObserver::num_tasks () const num_tasks tf::ChromeObserver::num_tasks

queries the number of tasks observed

void void tf::ChromeObserver::set_up (size_t num_workers) override final set_up tf::ChromeObserver::set_up set_up size_t num_workers

constructor-like method to call when the executor observer is fully created

num_workers

the number of the worker threads in the executor

void void tf::ChromeObserver::on_entry (WorkerView w, TaskView task_view) override final on_entry tf::ChromeObserver::on_entry on_entry WorkerView wv TaskView task_view

method to call before a worker thread executes a closure

wv

an immutable view of this worker thread

task_view

a constant wrapper object to the task

void void tf::ChromeObserver::on_exit (WorkerView w, TaskView task_view) override final on_exit tf::ChromeObserver::on_exit on_exit WorkerView wv TaskView task_view

method to call after a worker thread executed a closure

wv

an immutable view of this worker thread

task_view

a constant wrapper object to the task

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::Taskflowtaskflow;
    tf::Executorexecutor;

    //inserttasksintotaskflow
    //...

    //createacustomobserver
    std::shared_ptr<tf::ChromeObserver>observer=executor.make_observer<tf::ChromeObserver>();

    //runthetaskflow
    executor.run(taskflow).wait();

    //dumpthethreadactivitiestoachrome-tracingformat.
    observer->dump(std::cout);

tf::ChromeObserver
tf::ObserverInterface
tf::ChromeObserver
tf::ObserverInterface
- tf::ChromeObserver
  _timeline
- tf::ChromeObserver
  clear
- tf::ChromeObserver
  dump
- tf::ChromeObserver
  dump
- tf::ChromeObserver
  Executor
- tf::ChromeObserver
  num_tasks
- tf::ChromeObserver
  on_entry
- tf::ChromeObserver
  on_exit
- tf::ChromeObserver
  set_up
- tf::ChromeObserver
  ~ObserverInterface