HPX - High Performance ParalleX

PrevUpHomeNext

Function install_counter_type

hpx::performance_counters::install_counter_type — Install a new performance counter type in a way, which will uninstall it automatically during shutdown.

Synopsis

// In header: <hpx/performance_counters/manage_counter_type.hpp>


void install_counter_type(std::string const & name, counter_type type, 
                          error_code & ec = throws);

Description

The function install_counter_type will register a new counter type based on the provided counter_type_info. The counter type will be automatically unregistered during system shutdown.

[Note] Note

The counter type registry is a locality based service. You will have to register each counter type on every locality where a corresponding performance counter will be created.

As long as ec is not pre-initialized to hpx::throws this function doesn't throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters:

ec

[in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

name

[in] The global virtual name of the counter type. This name is expected to have the format /objectname/countername.

type

[in] The type of the counters of this counter_type.

Returns:

If successful, this function returns status_valid_data, otherwise it will either throw an exception or return an error_code from the enum counter_status (also, see note related to parameter ec).


PrevUpHomeNext