libcaf  0.15.3
Public Types | Public Member Functions | Public Attributes | List of all members
caf::scheduler::profiled_coordinator< Policy > Class Template Reference

A coordinator which keeps fine-grained profiling state about its workers and their jobs. More...

#include <profiled_coordinator.hpp>

Inheritance diagram for caf::scheduler::profiled_coordinator< Policy >:
caf::scheduler::coordinator< Policy > caf::scheduler::abstract_coordinator caf::actor_system::module

Public Types

using super = coordinator< Policy >
 
using clock_type = std::chrono::high_resolution_clock
 
using usec = std::chrono::microseconds
 
using msec = std::chrono::milliseconds
 
- Public Types inherited from caf::scheduler::coordinator< Policy >
using super = abstract_coordinator
 
using policy_data = typename Policy::coordinator_data
 
using worker_type = worker< Policy >
 
- Public Types inherited from caf::actor_system::module
enum  id_t {
  scheduler,
  middleman,
  opencl_manager,
  num_ids
}
 

Public Member Functions

 profiled_coordinator (actor_system &sys)
 
void init (actor_system_config &cfg) override
 Allows the module to change the configuration of the actor system during startup. More...
 
void start () override
 Starts any background threads needed by the module.
 
void stop () override
 Stops all background threads of the module.
 
void start_measuring (size_t worker, actor_id job)
 
void stop_measuring (size_t worker, actor_id job)
 
void remove_job (actor_id job)
 
template<class Time , class Label >
void record (Time t, Label label, size_t rec_id, const measurement &m)
 
void report (const actor_id &job, const measurement &m)
 
- Public Member Functions inherited from caf::scheduler::coordinator< Policy >
 coordinator (actor_system &sys)
 
worker_typeworker_by_id (size_t x)
 
policy_data & data ()
 
- Public Member Functions inherited from caf::scheduler::abstract_coordinator
 abstract_coordinator (actor_system &sys)
 
actor printer () const
 Returns a handle to the central printing actor.
 
template<class Duration , class... Data>
void delayed_send (Duration rel_time, strong_actor_ptr from, strong_actor_ptr to, message_id mid, message data)
 
actor_systemsystem ()
 
size_t max_throughput () const
 
size_t num_workers () const
 
id_t id () const override
 Returns the identifier of this module.
 
void * subtype_ptr () override
 Returns a pointer to the subtype.
 

Public Attributes

std::mutex job_mtx_
 
std::mutex file_mtx_
 
std::ofstream file_
 
msec resolution_
 
std::chrono::system_clock::time_point system_start_
 
clock_type::duration clock_start_
 
std::vector< worker_state > worker_states_
 
std::unordered_map< actor_id, measurement > jobs_
 
clock_type::duration last_flush_ = clock_type::duration::zero()
 

Additional Inherited Members

- Static Public Member Functions inherited from caf::scheduler::abstract_coordinator
static void cleanup_and_release (resumable *)
 
- Protected Member Functions inherited from caf::scheduler::coordinator< Policy >
void enqueue (resumable *ptr) override
 Puts what into the queue of a randomly chosen worker.
 
- Protected Member Functions inherited from caf::scheduler::abstract_coordinator
void stop_actors ()
 
- Protected Attributes inherited from caf::scheduler::abstract_coordinator
std::atomic< size_t > next_worker_
 
size_t max_throughput_
 
size_t num_workers_
 
strong_actor_ptr timer_
 
strong_actor_ptr printer_
 
actor_systemsystem_
 

Detailed Description

template<class Policy = policy::profiled<policy::work_stealing>>
class caf::scheduler::profiled_coordinator< Policy >

A coordinator which keeps fine-grained profiling state about its workers and their jobs.

Member Function Documentation

template<class Policy = policy::profiled<policy::work_stealing>>
void caf::scheduler::profiled_coordinator< Policy >::init ( actor_system_config )
overridevirtual

Allows the module to change the configuration of the actor system during startup.

Reimplemented from caf::scheduler::abstract_coordinator.


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