Taskflow  3.2.0-Master-Branch
Loading...
Searching...
No Matches
tf::ChromeObserver Class Reference

class to create an observer based on Chrome tracing format More...

#include <observer.hpp>

Inheritance diagram for tf::ChromeObserver:
Collaboration diagram for tf::ChromeObserver:

Public Member Functions

void dump (std::ostream &ostream) const
 dumps the timelines into a Chrome Tracing format through an output stream
 
std::string dump () const
 dumps the timelines into a Chrome Tracing format
 
void clear ()
 clears the timeline data
 
size_t num_tasks () const
 queries the number of tasks observed
 
- Public Member Functions inherited from tf::ObserverInterface
virtual ~ObserverInterface ()=default
 virtual destructor
 

Friends

class Executor
 

Detailed Description

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 observer
// run the taskflow
executor.run(taskflow).wait();
// dump the thread activities to a chrome-tracing format.
observer->dump(std::cout);
class to create an observer based on Chrome tracing format
Definition observer.hpp:231
class to create an executor for running a taskflow graph
Definition executor.hpp:50
tf::Future< void > run(Taskflow &taskflow)
runs a taskflow once
Definition executor.hpp:1573
std::shared_ptr< Observer > make_observer(ArgsT &&... args)
constructs an observer to inspect the activities of worker threads
Definition executor.hpp:1038
class to create a taskflow object
Definition core/taskflow.hpp:73

The documentation for this class was generated from the following file: