tf::TFProfObserver
tf::ObserverInterface
taskflow/core/observer.hpp
tf::TFProfObserver::TaskSummary
tf::TFProfObserver::WorkerSummary
tf::TFProfObserver::Summary
class friend class Executor Executor tf::TFProfObserver::Executor Executor
class friend class TFProfManager TFProfManager tf::TFProfObserver::TFProfManager TFProfManager
Timeline Timeline tf::TFProfObserver::_timeline _timeline tf::TFProfObserver::_timeline
std::vector< std::stack< observer_stamp_t > > std::vector<std::stack<observer_stamp_t> > tf::TFProfObserver::_stacks _stacks tf::TFProfObserver::_stacks
void void tf::TFProfObserver::dump (std::ostream &ostream) const dump tf::TFProfObserver::dump std::ostream & ostream

dumps the timelines into a Taskflow Profiler format through an output stream

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

dumps the timelines into a JSON string

void void tf::TFProfObserver::summary (std::ostream &ostream) const summary tf::TFProfObserver::summary std::ostream & ostream

shows the summary report through an output stream

std::string std::string tf::TFProfObserver::summary () const summary tf::TFProfObserver::summary

returns the summary report in a string

void void tf::TFProfObserver::clear () clear tf::TFProfObserver::clear

clears the timeline data

size_t size_t tf::TFProfObserver::num_tasks () const num_tasks tf::TFProfObserver::num_tasks

queries the number of tasks observed

size_t size_t tf::TFProfObserver::num_workers () const num_workers tf::TFProfObserver::num_workers

queries the number of observed workers

void void tf::TFProfObserver::set_up (size_t num_workers) override final set_up tf::TFProfObserver::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::TFProfObserver::on_entry (WorkerView, TaskView) override final on_entry tf::TFProfObserver::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::TFProfObserver::on_exit (WorkerView, TaskView) override final on_exit tf::TFProfObserver::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 the built-in taskflow profiler format

A tf::TFProfObserver inherits tf::ObserverInterface and defines methods to dump the observed thread activities into a format that can be visualized through Taskflow Profiler.

    tf::Taskflowtaskflow;
    tf::Executorexecutor;

    //inserttasksintotaskflow
    //...

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

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

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

tf::ObserverInterface
tf::TFProfObserver
tf::ObserverInterface
tf::TFProfObserver
- tf::TFProfObserver
  _stacks
- tf::TFProfObserver
  _timeline
- tf::TFProfObserver
  clear
- tf::TFProfObserver
  dump
- tf::TFProfObserver
  dump
- tf::TFProfObserver
  Executor
- tf::TFProfObserver
  num_tasks
- tf::TFProfObserver
  num_workers
- tf::TFProfObserver
  on_entry
- tf::TFProfObserver
  on_exit
- tf::TFProfObserver
  set_up
- tf::TFProfObserver
  summary
- tf::TFProfObserver
  summary
- tf::TFProfObserver
  TFProfManager
- tf::TFProfObserver
  ~ObserverInterface