performance_counters¶
The contents of this module can be included with the header
hpx/modules/performance_counters.hpp
. These headers may be used by user-code but are not
guaranteed stable (neither header location nor contents). You are using these at
your own risk. If you wish to use non-public functionality from a module we
strongly suggest only including the module header hpx/modules/performance_counters.hpp
, not
the particular header in which the functionality you would like to use is
defined. See Public API for a list of names that are part of the public
HPX API.
-
namespace
hpx
-
namespace
performance_counters
¶ Functions
-
bool
action_invocation_counter_discoverer
(hpx::actions::detail::invocation_count_registry const ®istry, counter_info const &info, counter_path_elements &p, discover_counter_func const &f, discover_counters_mode mode, error_code &ec)¶
-
bool
-
namespace
-
namespace
hpx
-
namespace
performance_counters
Functions
-
void
register_agas_counter_types
(agas::addressing_service &client)¶ Install performance counter types exposing properties from the local cache.
-
void
-
namespace
-
namespace
hpx
-
namespace
agas
Enums
-
enum
namespace_action_code
¶ Values:
-
invalid_request
= 0¶
-
locality_ns_service
= 0b1100000¶
-
locality_ns_bulk_service
= 0b1100001¶
-
locality_ns_allocate
= 0b1100010¶
-
locality_ns_free
= 0b1100011¶
-
locality_ns_localities
= 0b1100100¶
-
locality_ns_num_localities
= 0b1100101¶
-
locality_ns_num_threads
= 0b1100110¶
-
locality_ns_statistics_counter
= 0b1100111¶
-
locality_ns_resolve_locality
= 0b1101000¶
-
primary_ns_service
= 0b1000000¶
-
primary_ns_bulk_service
= 0b1000001¶
-
primary_ns_route
= 0b1000010¶
-
primary_ns_bind_gid
= 0b1000011¶
-
primary_ns_resolve_gid
= 0b1000100¶
-
primary_ns_unbind_gid
= 0b1000101¶
-
primary_ns_increment_credit
= 0b1000110¶
-
primary_ns_decrement_credit
= 0b1000111¶
-
primary_ns_allocate
= 0b1001000¶
-
primary_ns_begin_migration
= 0b1001001¶
-
primary_ns_end_migration
= 0b1001010¶
-
primary_ns_statistics_counter
= 0b1001011¶
-
component_ns_service
= 0b0100000¶
-
component_ns_bulk_service
= 0b0100001¶
-
component_ns_bind_prefix
= 0b0100010¶
-
component_ns_bind_name
= 0b0100011¶
-
component_ns_resolve_id
= 0b0100100¶
-
component_ns_unbind_name
= 0b0100101¶
-
component_ns_iterate_types
= 0b0100110¶
-
component_ns_get_component_type_name
= 0b0100111¶
-
component_ns_num_localities
= 0b0101000¶
-
component_ns_statistics_counter
= 0b0101001¶
-
symbol_ns_service
= 0b0010000¶
-
symbol_ns_bulk_service
= 0b0010001¶
-
symbol_ns_bind
= 0b0010010¶
-
symbol_ns_resolve
= 0b0010011¶
-
symbol_ns_unbind
= 0b0010100¶
-
symbol_ns_iterate_names
= 0b0010101¶
-
symbol_ns_on_event
= 0b0010110¶
-
symbol_ns_statistics_counter
= 0b0010111¶
-
Variables
-
constexpr char const *const
performance_counter_basename
= "/agas/"¶
-
enum
-
namespace
-
namespace
hpx
-
namespace
performance_counters
-
template<typename
Derived
>
classbase_performance_counter
¶ Public Types
-
typedef Derived
type_holder
¶
-
typedef hpx::performance_counters::server::base_performance_counter
base_type_holder
¶
Public Functions
-
base_performance_counter
()¶
-
base_performance_counter
(hpx::performance_counters::counter_info const &info)¶
-
void
finalize
()¶
Private Types
-
typedef hpx::components::component_base<Derived>
base_type
¶
-
typedef Derived
-
template<typename
-
namespace
-
namespace
hpx
-
namespace
agas
Functions
-
void
component_namespace_register_counter_types
(error_code &ec = throws)¶
-
void
-
namespace
-
namespace
hpx
-
namespace
performance_counters
Functions
-
bool
default_counter_discoverer
(counter_info const&, discover_counter_func const&, discover_counters_mode, error_code&)¶ Default discovery function for performance counters; to be registered with the counter types. It will pass the counter_info and the error_code to the supplied function.
-
bool
locality_counter_discoverer
(counter_info const&, discover_counter_func const&, discover_counters_mode, error_code&)¶ Default discoverer function for performance counters; to be registered with the counter types. It is suitable to be used for all counters following the naming scheme:
/<objectname>(locality#<locality_id>/total)/<instancename>
-
bool
locality_pool_counter_discoverer
(counter_info const&, discover_counter_func const&, discover_counters_mode, error_code&)¶ Default discoverer function for performance counters; to be registered with the counter types. It is suitable to be used for all counters following the naming scheme:
/<objectname>(locality#<locality_id>/pool#<pool_name>/total)/<instancename>
-
bool
locality0_counter_discoverer
(counter_info const&, discover_counter_func const&, discover_counters_mode, error_code&)¶ Default discoverer function for AGAS performance counters; to be registered with the counter types. It is suitable to be used for all counters following the naming scheme:
/<objectname>{locality#0/total}/<instancename>
-
bool
locality_thread_counter_discoverer
(counter_info const&, discover_counter_func const&, discover_counters_mode, error_code&)¶ Default discoverer function for performance counters; to be registered with the counter types. It is suitable to be used for all counters following the naming scheme:
/<objectname>(locality#<locality_id>/worker-thread#<threadnum>)/<instancename>
-
bool
locality_pool_thread_counter_discoverer
(counter_info const &info, discover_counter_func const &f, discover_counters_mode mode, error_code &ec)¶ Default discoverer function for performance counters; to be registered with the counter types. It is suitable to be used for all counters following the naming scheme:
/<objectname>{locality#<locality_id>/pool#<poolname>/thread#<threadnum>}/<instancename>
-
bool
locality_pool_thread_no_total_counter_discoverer
(counter_info const &info, discover_counter_func const &f, discover_counters_mode mode, error_code &ec)¶ Default discoverer function for performance counters; to be registered with the counter types. It is suitable to be used for all counters following the naming scheme:
/<objectname>{locality#<locality_id>/pool#<poolname>/thread#<threadnum>}/<instancename>
This is essentially the same as above just that locality#*/total is not supported.
-
bool
locality_numa_counter_discoverer
(counter_info const&, discover_counter_func const&, discover_counters_mode, error_code&)¶ Default discoverer function for performance counters; to be registered with the counter types. It is suitable to be used for all counters following the naming scheme:
/<objectname>(locality#<locality_id>/numa-node#<threadnum>)/<instancename>
-
naming::gid_type
locality_raw_counter_creator
(counter_info const&, hpx::util::function_nonser<std::int64_t(bool)> const&, error_code&, )¶ Creation function for raw counters. The passed function is encapsulating the actual value to monitor. This function checks the validity of the supplied counter name, it has to follow the scheme:
/<objectname>(locality#<locality_id>/total)/<instancename>
-
naming::gid_type
locality_raw_values_counter_creator
(counter_info const&, hpx::util::function_nonser<std::vector<std::int64_t>(bool)> const&, error_code&, )¶
-
naming::gid_type
agas_raw_counter_creator
(counter_info const&, error_code&, char const*const)¶ Creation function for raw counters. The passed function is encapsulating the actual value to monitor. This function checks the validity of the supplied counter name, it has to follow the scheme:
/agas(<objectinstance>/total)/<instancename>
-
bool
agas_counter_discoverer
(counter_info const&, discover_counter_func const&, discover_counters_mode, error_code&)¶ Default discoverer function for performance counters; to be registered with the counter types. It is suitable to be used for all counters following the naming scheme:
/agas(<objectinstance>/total)/<instancename>
-
naming::gid_type
local_action_invocation_counter_creator
(counter_info const&, error_code&)¶
-
bool
local_action_invocation_counter_discoverer
(counter_info const&, discover_counter_func const&, discover_counters_mode, error_code&)¶
-
bool
-
namespace
-
namespace
hpx
-
namespace
performance_counters
Functions
-
hpx::future<id_type>
create_performance_counter_async
(id_type target_id, counter_info const &info)¶
-
id_type
create_performance_counter
(id_type target_id, counter_info const &info, error_code &ec = throws)¶
-
hpx::future<id_type>
-
namespace
-
namespace
hpx
-
namespace
hpx
-
namespace
performance_counters
Typedefs
-
typedef hpx::util::function_nonser<naming::gid_type(counter_info const&, error_code&)>
create_counter_func
¶ This declares the type of a function, which will be called by HPX whenever a new performance counter instance of a particular type needs to be created.
-
typedef hpx::util::function_nonser<bool(counter_info const&, error_code&)>
discover_counter_func
¶ This declares a type of a function, which will be passed to a discover_counters_func in order to be called for each discovered performance counter instance.
-
typedef hpx::util::function_nonser<bool(counter_info const&, discover_counter_func const&, discover_counters_mode, error_code&)>
discover_counters_func
¶ This declares the type of a function, which will be called by HPX whenever it needs to discover all performance counter instances of a particular type.
Enums
-
enum
counter_type
¶ Values:
-
counter_text
¶ counter_text shows a variable-length text string. It does not deliver calculated values.
Formula: None Average: None Type: Text
-
counter_raw
¶ counter_raw shows the last observed value only. It does not deliver an average.
Formula: None. Shows raw data as collected. Average: None Type: Instantaneous
-
counter_monotonically_increasing
¶
-
counter_average_base
¶ counter_average_base is used as the base data (denominator) in the computation of time or count averages for the counter_average_count and counter_average_timer counter types. This counter type collects the last observed value only.
Formula: None. This counter uses raw data in factional calculations without delivering an output. Average: SUM (N) / x Type: Instantaneous
-
counter_average_count
¶ counter_average_count shows how many items are processed, on average, during an operation. Counters of this type display a ratio of the items processed (such as bytes sent) to the number of operations completed. The ratio is calculated by comparing the number of items processed during the last interval to the number of operations completed during the last interval.
Formula: (N1 - N0) / (D1 - D0), where the numerator (N) represents the number of items processed during the last sample interval, and the denominator (D) represents the number of operations completed during the last two sample intervals. Average: (Nx - N0) / (Dx - D0) Type: Average
-
counter_aggregating
¶ counter_aggregating applies a function to an embedded counter instance. The embedded counter is usually evaluated repeatedly after a fixed (but configurable) time interval.
Formula: F(Nx)
-
counter_average_timer
¶ counter_average_timer measures the average time it takes to complete a process or operation. Counters of this type display a ratio of the total elapsed time of the sample interval to the number of processes or operations completed during that time. This counter type measures time in ticks of the system clock. The variable F represents the number of ticks per second. The value of F is factored into the equation so that the result is displayed in seconds.
Formula: ((N1 - N0) / F) / (D1 - D0), where the numerator (N) represents the number of ticks counted during the last sample interval, the variable F represents the frequency of the ticks, and the denominator (D) represents the number of operations completed during the last sample interval. Average: ((Nx - N0) / F) / (Dx - D0) Type: Average
-
counter_elapsed_time
¶ counter_elapsed_time shows the total time between when the component or process started and the time when this value is calculated. The variable F represents the number of time units that elapse in one second. The value of F is factored into the equation so that the result is displayed in seconds.
Formula: (D0 - N0) / F, where the nominator (D) represents the current time, the numerator (N) represents the time the object was started, and the variable F represents the number of time units that elapse in one second. Average: (Dx - N0) / F Type: Difference
-
counter_histogram
¶ counter_histogram exposes a histogram of the measured values instead of a single value as many of the other counter types. Counters of this type expose a counter_value_array instead of a counter_value. Those will also not implement the get_counter_value() functionality. The results are exposed through a separate get_counter_values_array() function.
The first three values in the returned array represent the lower and upper boundaries, and the size of the histogram buckets. All remaining values in the returned array represent the number of measurements for each of the buckets in the histogram.
-
counter_raw_values
¶ counter_raw_values exposes an array of measured values instead of a single value as many of the other counter types. Counters of this type expose a counter_value_array instead of a counter_value. Those will also not implement the get_counter_value() functionality. The results are exposed through a separate get_counter_values_array() function.
-
counter_text
counter_text shows a variable-length text string. It does not deliver calculated values.
Formula: None Average: None Type: Text
-
counter_raw
counter_raw shows the last observed value only. It does not deliver an average.
Formula: None. Shows raw data as collected. Average: None Type: Instantaneous
-
counter_monotonically_increasing
-
counter_average_base
counter_average_base is used as the base data (denominator) in the computation of time or count averages for the counter_average_count and counter_average_timer counter types. This counter type collects the last observed value only.
Formula: None. This counter uses raw data in factional calculations without delivering an output. Average: SUM (N) / x Type: Instantaneous
-
counter_average_count
counter_average_count shows how many items are processed, on average, during an operation. Counters of this type display a ratio of the items processed (such as bytes sent) to the number of operations completed. The ratio is calculated by comparing the number of items processed during the last interval to the number of operations completed during the last interval.
Formula: (N1 - N0) / (D1 - D0), where the numerator (N) represents the number of items processed during the last sample interval, and the denominator (D) represents the number of operations completed during the last two sample intervals. Average: (Nx - N0) / (Dx - D0) Type: Average
-
counter_aggregating
counter_aggregating applies a function to an embedded counter instance. The embedded counter is usually evaluated repeatedly after a fixed (but configurable) time interval.
Formula: F(Nx)
-
counter_average_timer
counter_average_timer measures the average time it takes to complete a process or operation. Counters of this type display a ratio of the total elapsed time of the sample interval to the number of processes or operations completed during that time. This counter type measures time in ticks of the system clock. The variable F represents the number of ticks per second. The value of F is factored into the equation so that the result is displayed in seconds.
Formula: ((N1 - N0) / F) / (D1 - D0), where the numerator (N) represents the number of ticks counted during the last sample interval, the variable F represents the frequency of the ticks, and the denominator (D) represents the number of operations completed during the last sample interval. Average: ((Nx - N0) / F) / (Dx - D0) Type: Average
-
counter_elapsed_time
counter_elapsed_time shows the total time between when the component or process started and the time when this value is calculated. The variable F represents the number of time units that elapse in one second. The value of F is factored into the equation so that the result is displayed in seconds.
Formula: (D0 - N0) / F, where the nominator (D) represents the current time, the numerator (N) represents the time the object was started, and the variable F represents the number of time units that elapse in one second. Average: (Dx - N0) / F Type: Difference
-
counter_histogram
counter_histogram exposes a histogram of the measured values instead of a single value as many of the other counter types. Counters of this type expose a counter_value_array instead of a counter_value. Those will also not implement the get_counter_value() functionality. The results are exposed through a separate get_counter_values_array() function.
The first three values in the returned array represent the lower and upper boundaries, and the size of the histogram buckets. All remaining values in the returned array represent the number of measurements for each of the buckets in the histogram.
-
counter_raw_values
counter_raw_values exposes an array of measured values instead of a single value as many of the other counter types. Counters of this type expose a counter_value_array instead of a counter_value. Those will also not implement the get_counter_value() functionality. The results are exposed through a separate get_counter_values_array() function.
-
-
enum
counter_status
¶ Status and error codes used by the functions related to performance counters.
Values:
-
status_valid_data
¶ No error occurred, data is valid.
-
status_new_data
¶ Data is valid and different from last call.
-
status_invalid_data
¶ Some error occurred, data is not value.
-
status_already_defined
¶ The type or instance already has been defined.
-
status_counter_unknown
¶ The counter instance is unknown.
-
status_counter_type_unknown
¶ The counter type is unknown.
-
status_generic_error
¶ A unknown error occurred.
-
status_valid_data
No error occurred, data is valid.
-
status_new_data
Data is valid and different from last call.
-
status_invalid_data
Some error occurred, data is not value.
-
status_already_defined
The type or instance already has been defined.
-
status_counter_unknown
The counter instance is unknown.
-
status_counter_type_unknown
The counter type is unknown.
-
status_generic_error
A unknown error occurred.
-
Functions
-
char const *
get_counter_type_name
(counter_type state)¶ Return the readable name of a given counter type.
-
bool
status_is_valid
(counter_status s)¶
-
counter_status
add_counter_type
(counter_info const &info, error_code &ec)¶
-
naming::id_type
get_counter
(std::string const &name, error_code &ec)¶
-
naming::id_type
get_counter
(counter_info const &info, error_code &ec)¶
Variables
-
constexpr const char
counter_prefix
[] = "/counters"¶
-
constexpr std::size_t
counter_prefix_len
= (sizeof(counter_prefix) / sizeof(counter_prefix[0])) - 1¶
-
struct
counter_info
¶ Public Functions
-
counter_info
(counter_type type = counter_raw)¶
Public Members
-
counter_type
type_
¶ The type of the described counter.
-
counter_status
status_
¶ The status of the counter object.
Private Functions
-
void
serialize
(serialization::output_archive &ar, const unsigned int)¶
-
void
serialize
(serialization::input_archive &ar, const unsigned int)¶
Friends
-
friend
hpx::performance_counters::hpx::serialization::access
-
-
struct
counter_path_elements
: public hpx::performance_counters::counter_type_path_elements¶ - #include <counters.hpp>
A counter_path_elements holds the elements of a full name for a counter instance. Generally, a full name of a counter instance has the structure:
/objectname{parentinstancename::parentindex/instancename#instanceindex} /countername#parameters
i.e. /queue{localityprefix/thread#2}/length
Public Types
-
typedef counter_type_path_elements
base_type
¶
Public Functions
-
counter_path_elements
()¶
-
counter_path_elements
(std::string const &objectname, std::string const &countername, std::string const ¶meters, std::string const &parentname, std::string const &instancename, std::int64_t parentindex = -1, std::int64_t instanceindex = -1, bool parentinstance_is_basename = false)¶
-
counter_path_elements
(std::string const &objectname, std::string const &countername, std::string const ¶meters, std::string const &parentname, std::string const &instancename, std::string const &subinstancename, std::int64_t parentindex = -1, std::int64_t instanceindex = -1, std::int64_t subinstanceindex = -1, bool parentinstance_is_basename = false)¶
Public Members
-
bool
parentinstance_is_basename_
¶ the parentinstancename_
Private Functions
-
void
serialize
(serialization::output_archive &ar, const unsigned int)¶
-
void
serialize
(serialization::input_archive &ar, const unsigned int)¶
Friends
-
friend
hpx::performance_counters::hpx::serialization::access
member holds a base counter name
-
typedef counter_type_path_elements
-
struct
counter_type_path_elements
¶ - #include <counters.hpp>
A counter_type_path_elements holds the elements of a full name for a counter type. Generally, a full name of a counter type has the structure:
/objectname/countername
i.e. /queue/length
Subclassed by hpx::performance_counters::counter_path_elements
Public Functions
-
counter_type_path_elements
()¶
Public Members
Protected Functions
-
void
serialize
(serialization::output_archive &ar, const unsigned int)¶
-
void
serialize
(serialization::input_archive &ar, const unsigned int)¶
Friends
-
friend
hpx::performance_counters::hpx::serialization::access
-
-
typedef hpx::util::function_nonser<naming::gid_type(counter_info const&, error_code&)>
-
namespace
Defines
-
HPX_PERFORMANCE_COUNTER_V1
¶
-
namespace
hpx
-
namespace
performance_counters
Enums
-
enum
counter_type
Values:
-
counter_text
counter_text shows a variable-length text string. It does not deliver calculated values.
Formula: None Average: None Type: Text
-
counter_raw
counter_raw shows the last observed value only. It does not deliver an average.
Formula: None. Shows raw data as collected. Average: None Type: Instantaneous
-
counter_monotonically_increasing
-
counter_average_base
counter_average_base is used as the base data (denominator) in the computation of time or count averages for the counter_average_count and counter_average_timer counter types. This counter type collects the last observed value only.
Formula: None. This counter uses raw data in factional calculations without delivering an output. Average: SUM (N) / x Type: Instantaneous
-
counter_average_count
counter_average_count shows how many items are processed, on average, during an operation. Counters of this type display a ratio of the items processed (such as bytes sent) to the number of operations completed. The ratio is calculated by comparing the number of items processed during the last interval to the number of operations completed during the last interval.
Formula: (N1 - N0) / (D1 - D0), where the numerator (N) represents the number of items processed during the last sample interval, and the denominator (D) represents the number of operations completed during the last two sample intervals. Average: (Nx - N0) / (Dx - D0) Type: Average
-
counter_aggregating
counter_aggregating applies a function to an embedded counter instance. The embedded counter is usually evaluated repeatedly after a fixed (but configurable) time interval.
Formula: F(Nx)
-
counter_average_timer
counter_average_timer measures the average time it takes to complete a process or operation. Counters of this type display a ratio of the total elapsed time of the sample interval to the number of processes or operations completed during that time. This counter type measures time in ticks of the system clock. The variable F represents the number of ticks per second. The value of F is factored into the equation so that the result is displayed in seconds.
Formula: ((N1 - N0) / F) / (D1 - D0), where the numerator (N) represents the number of ticks counted during the last sample interval, the variable F represents the frequency of the ticks, and the denominator (D) represents the number of operations completed during the last sample interval. Average: ((Nx - N0) / F) / (Dx - D0) Type: Average
-
counter_elapsed_time
counter_elapsed_time shows the total time between when the component or process started and the time when this value is calculated. The variable F represents the number of time units that elapse in one second. The value of F is factored into the equation so that the result is displayed in seconds.
Formula: (D0 - N0) / F, where the nominator (D) represents the current time, the numerator (N) represents the time the object was started, and the variable F represents the number of time units that elapse in one second. Average: (Dx - N0) / F Type: Difference
-
counter_histogram
counter_histogram exposes a histogram of the measured values instead of a single value as many of the other counter types. Counters of this type expose a counter_value_array instead of a counter_value. Those will also not implement the get_counter_value() functionality. The results are exposed through a separate get_counter_values_array() function.
The first three values in the returned array represent the lower and upper boundaries, and the size of the histogram buckets. All remaining values in the returned array represent the number of measurements for each of the buckets in the histogram.
-
counter_raw_values
counter_raw_values exposes an array of measured values instead of a single value as many of the other counter types. Counters of this type expose a counter_value_array instead of a counter_value. Those will also not implement the get_counter_value() functionality. The results are exposed through a separate get_counter_values_array() function.
-
counter_text
counter_text shows a variable-length text string. It does not deliver calculated values.
Formula: None Average: None Type: Text
-
counter_raw
counter_raw shows the last observed value only. It does not deliver an average.
Formula: None. Shows raw data as collected. Average: None Type: Instantaneous
-
counter_monotonically_increasing
-
counter_average_base
counter_average_base is used as the base data (denominator) in the computation of time or count averages for the counter_average_count and counter_average_timer counter types. This counter type collects the last observed value only.
Formula: None. This counter uses raw data in factional calculations without delivering an output. Average: SUM (N) / x Type: Instantaneous
-
counter_average_count
counter_average_count shows how many items are processed, on average, during an operation. Counters of this type display a ratio of the items processed (such as bytes sent) to the number of operations completed. The ratio is calculated by comparing the number of items processed during the last interval to the number of operations completed during the last interval.
Formula: (N1 - N0) / (D1 - D0), where the numerator (N) represents the number of items processed during the last sample interval, and the denominator (D) represents the number of operations completed during the last two sample intervals. Average: (Nx - N0) / (Dx - D0) Type: Average
-
counter_aggregating
counter_aggregating applies a function to an embedded counter instance. The embedded counter is usually evaluated repeatedly after a fixed (but configurable) time interval.
Formula: F(Nx)
-
counter_average_timer
counter_average_timer measures the average time it takes to complete a process or operation. Counters of this type display a ratio of the total elapsed time of the sample interval to the number of processes or operations completed during that time. This counter type measures time in ticks of the system clock. The variable F represents the number of ticks per second. The value of F is factored into the equation so that the result is displayed in seconds.
Formula: ((N1 - N0) / F) / (D1 - D0), where the numerator (N) represents the number of ticks counted during the last sample interval, the variable F represents the frequency of the ticks, and the denominator (D) represents the number of operations completed during the last sample interval. Average: ((Nx - N0) / F) / (Dx - D0) Type: Average
-
counter_elapsed_time
counter_elapsed_time shows the total time between when the component or process started and the time when this value is calculated. The variable F represents the number of time units that elapse in one second. The value of F is factored into the equation so that the result is displayed in seconds.
Formula: (D0 - N0) / F, where the nominator (D) represents the current time, the numerator (N) represents the time the object was started, and the variable F represents the number of time units that elapse in one second. Average: (Dx - N0) / F Type: Difference
-
counter_histogram
counter_histogram exposes a histogram of the measured values instead of a single value as many of the other counter types. Counters of this type expose a counter_value_array instead of a counter_value. Those will also not implement the get_counter_value() functionality. The results are exposed through a separate get_counter_values_array() function.
The first three values in the returned array represent the lower and upper boundaries, and the size of the histogram buckets. All remaining values in the returned array represent the number of measurements for each of the buckets in the histogram.
-
counter_raw_values
counter_raw_values exposes an array of measured values instead of a single value as many of the other counter types. Counters of this type expose a counter_value_array instead of a counter_value. Those will also not implement the get_counter_value() functionality. The results are exposed through a separate get_counter_values_array() function.
-
-
enum
counter_status
Values:
-
status_valid_data
No error occurred, data is valid.
-
status_new_data
Data is valid and different from last call.
-
status_invalid_data
Some error occurred, data is not value.
-
status_already_defined
The type or instance already has been defined.
-
status_counter_unknown
The counter instance is unknown.
-
status_counter_type_unknown
The counter type is unknown.
-
status_generic_error
A unknown error occurred.
-
status_valid_data
No error occurred, data is valid.
-
status_new_data
Data is valid and different from last call.
-
status_invalid_data
Some error occurred, data is not value.
-
status_already_defined
The type or instance already has been defined.
-
status_counter_unknown
The counter instance is unknown.
-
status_counter_type_unknown
The counter type is unknown.
-
status_generic_error
A unknown error occurred.
-
Functions
-
counter_status
get_counter_type_name
(counter_type_path_elements const &path, std::string &result, error_code &ec = throws)¶ Create a full name of a counter type from the contents of the given counter_type_path_elements instance.The generated counter type name will not contain any parameters.
-
counter_status
get_full_counter_type_name
(counter_type_path_elements const &path, std::string &result, error_code &ec = throws)¶ Create a full name of a counter type from the contents of the given counter_type_path_elements instance. The generated counter type name will contain all parameters.
-
counter_status
get_counter_name
(counter_path_elements const &path, std::string &result, error_code &ec = throws)¶ Create a full name of a counter from the contents of the given counter_path_elements instance.
-
counter_status
get_counter_instance_name
(counter_path_elements const &path, std::string &result, error_code &ec = throws)¶ Create a name of a counter instance from the contents of the given counter_path_elements instance.
-
counter_status
get_counter_type_path_elements
(std::string const &name, counter_type_path_elements &path, error_code &ec = throws)¶ Fill the given counter_type_path_elements instance from the given full name of a counter type.
-
counter_status
get_counter_path_elements
(std::string const &name, counter_path_elements &path, error_code &ec = throws)¶ Fill the given counter_path_elements instance from the given full name of a counter.
-
counter_status
get_counter_name
(std::string const &name, std::string &countername, error_code &ec = throws)¶ Return the canonical counter instance name from a given full instance name.
-
counter_status
get_counter_type_name
(std::string const &name, std::string &type_name, error_code &ec = throws)¶ Return the canonical counter type name from a given (full) instance name.
-
counter_status
complement_counter_info
(counter_info &info, counter_info const &type_info, error_code &ec = throws)¶ Complement the counter info if parent instance name is missing.
-
counter_status
complement_counter_info
(counter_info &info, error_code &ec = throws)¶
-
counter_status
add_counter_type
(counter_info const &info, create_counter_func const &create_counter, discover_counters_func const &discover_counters, error_code &ec = throws)¶
-
counter_status
discover_counter_types
(discover_counter_func const &discover_counter, discover_counters_mode mode = discover_counters_minimal, error_code &ec = throws)¶ Call the supplied function for each registered counter type.
-
counter_status
discover_counter_types
(std::vector<counter_info> &counters, discover_counters_mode mode = discover_counters_minimal, error_code &ec = throws)¶ Return a list of all available counter descriptions.
-
counter_status
discover_counter_type
(std::string const &name, discover_counter_func const &discover_counter, discover_counters_mode mode = discover_counters_minimal, error_code &ec = throws)¶ Call the supplied function for the given registered counter type.
-
counter_status
discover_counter_type
(counter_info const &info, discover_counter_func const &discover_counter, discover_counters_mode mode = discover_counters_minimal, error_code &ec = throws)¶
-
counter_status
discover_counter_type
(std::string const &name, std::vector<counter_info> &counters, discover_counters_mode mode = discover_counters_minimal, error_code &ec = throws)¶ Return a list of matching counter descriptions for the given registered counter type.
-
counter_status
discover_counter_type
(counter_info const &info, std::vector<counter_info> &counters, discover_counters_mode mode = discover_counters_minimal, error_code &ec = throws)¶
-
bool
expand_counter_info
(counter_info const&, discover_counter_func const&, error_code&)¶ call the supplied function will all expanded versions of the supplied counter info.
This function expands all locality#* and worker-thread#* wild cards only.
-
counter_status
remove_counter_type
(counter_info const &info, error_code &ec = throws)¶ Remove an existing counter type from the (local) registry.
- Note
This doesn’t remove existing counters of this type, it just inhibits defining new counters using this type.
-
counter_status
get_counter_type
(std::string const &name, counter_info &info, error_code &ec = throws)¶ Retrieve the counter type for the given counter name from the (local) registry.
-
lcos::future<naming::id_type>
get_counter_async
(std::string name, error_code &ec = throws)¶ Get the global id of an existing performance counter, if the counter does not exist yet, the function attempts to create the counter based on the given counter name.
-
lcos::future<naming::id_type>
get_counter_async
(counter_info const &info, error_code &ec = throws)¶ Get the global id of an existing performance counter, if the counter does not exist yet, the function attempts to create the counter based on the given counter info.
-
void
get_counter_infos
(counter_info const &info, counter_type &type, std::string &helptext, std::uint32_t &version, error_code &ec = throws)¶ Retrieve the meta data specific for the given counter instance.
-
void
get_counter_infos
(std::string name, counter_type &type, std::string &helptext, std::uint32_t &version, error_code &ec = throws)¶ Retrieve the meta data specific for the given counter instance.
-
struct
counter_value
¶ Public Functions
-
template<typename
T
>
Tget_value
(error_code &ec = throws) const¶ Retrieve the ‘real’ value of the counter_value, converted to the requested type T.
Public Members
-
counter_status
status_
¶ The status of the counter value.
-
bool
scale_inverse_
¶ If true, value_ needs to be divided by scaling_, otherwise it has to be multiplied.
Private Functions
-
void
serialize
(serialization::output_archive &ar, const unsigned int)¶
-
void
serialize
(serialization::input_archive &ar, const unsigned int)¶
Friends
-
friend
hpx::performance_counters::hpx::serialization::access
-
template<typename
-
struct
counter_values_array
¶ Public Functions
-
counter_values_array
(std::vector<std::int64_t> &&values, std::int64_t scaling = 1, bool scale_inverse = false)¶
-
counter_values_array
(std::vector<std::int64_t> const &values, std::int64_t scaling = 1, bool scale_inverse = false)¶
-
template<typename
T
>
Tget_value
(std::size_t index, error_code &ec = throws) const¶ Retrieve the ‘real’ value of the counter_value, converted to the requested type T.
Public Members
-
counter_status
status_
¶ The status of the counter value.
-
bool
scale_inverse_
¶ If true, value_ needs to be divided by scaling_, otherwise it has to be multiplied.
Private Functions
-
void
serialize
(serialization::output_archive &ar, const unsigned int)¶
-
void
serialize
(serialization::input_archive &ar, const unsigned int)¶
Friends
-
friend
hpx::performance_counters::hpx::serialization::access
-
-
enum
-
namespace
-
namespace
hpx
-
namespace
agas
Functions
-
void
locality_namespace_register_counter_types
(error_code &ec = throws)¶
-
void
-
namespace
-
namespace
hpx
-
namespace
performance_counters
Functions
-
void
install_counter
(naming::id_type const &id, counter_info const &info, error_code &ec = throws)¶ Install a new performance counter in a way, which will uninstall it automatically during shutdown.
-
void
-
namespace
-
namespace
hpx
-
namespace
performance_counters
Functions
-
counter_status
install_counter_type
(std::string const &name, hpx::util::function_nonser<std::int64_t(bool)> const &counter_value, std::string const &helptext = "", std::string const &uom = "", counter_type type = counter_raw, error_code &ec = throws, )¶ Install a new generic performance counter type in a way, which will uninstall it automatically during shutdown.
The function install_counter_type will register a new generic counter type based on the provided function. The counter type will be automatically unregistered during system shutdown. Any consumer querying any instance of this this counter type will cause the provided function to be called and the returned value to be exposed as the counter value.
The counter type is registered such that there can be one counter instance per locality. The expected naming scheme for the counter instances is:
'/objectname{locality#<*>/total}/countername'
where ‘<*>’ is a zero based integer identifying the locality the counter is created on.- Note
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.
- Return
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).
- 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.
- Parameters
name
: [in] The global virtual name of the counter type. This name is expected to have the format /objectname/countername.counter_value
: [in] The function to call whenever the counter value is requested by a consumer.helptext
: [in, optional] A longer descriptive text shown to the user to explain the nature of the counters created from this type.uom
: [in] The unit of measure for the new performance counter type.type
: [in] Type for the new performance counter type.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.
-
counter_status
install_counter_type
(std::string const &name, hpx::util::function_nonser<std::vector<std::int64_t>(bool)> const &counter_value, std::string const &helptext = "", std::string const &uom = "", error_code &ec = throws, )¶ Install a new generic performance counter type returning an array of values in a way, that will uninstall it automatically during shutdown.
The function install_counter_type will register a new generic counter type that returns an array of values based on the provided function. The counter type will be automatically unregistered during system shutdown. Any consumer querying any instance of this this counter type will cause the provided function to be called and the returned array value to be exposed as the counter value.
The counter type is registered such that there can be one counter instance per locality. The expected naming scheme for the counter instances is:
'/objectname{locality#<*>/total}/countername'
where ‘<*>’ is a zero based integer identifying the locality the counter is created on.- Note
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.
- Return
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).
- 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.
- Parameters
name
: [in] The global virtual name of the counter type. This name is expected to have the format /objectname/countername.counter_value
: [in] The function to call whenever the counter value (array of values) is requested by a consumer.helptext
: [in, optional] A longer descriptive text shown to the user to explain the nature of the counters created from this type.uom
: [in] The unit of measure for the new performance counter type.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.
-
void
install_counter_type
(std::string const &name, counter_type type, error_code &ec = throws)¶ Install a new performance counter type in a way, which will uninstall it automatically during shutdown.
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.
- Return
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).
- 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.
- Note
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
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.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.
-
counter_status
install_counter_type
(std::string const &name, counter_type type, std::string const &helptext, std::string const &uom = "", std::uint32_t version = HPX_PERFORMANCE_COUNTER_V1, error_code &ec = throws)¶ Install a new performance counter type in a way, which will uninstall it automatically during shutdown.
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.
- Return
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).
- 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.
- Note
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
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.helptext
: [in] A longer descriptive text shown to the user to explain the nature of the counters created from this type.uom
: [in] The unit of measure for the new performance counter type.version
: [in] The version of the counter type. This is currently expected to be set to HPX_PERFORMANCE_COUNTER_V1.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.
-
counter_status
install_counter_type
(std::string const &name, counter_type type, std::string const &helptext, create_counter_func const &create_counter, discover_counters_func const &discover_counters, std::uint32_t version = HPX_PERFORMANCE_COUNTER_V1, std::string const &uom = "", error_code &ec = throws)¶ Install a new generic performance counter type in a way, which will uninstall it automatically during shutdown.
The function install_counter_type will register a new generic counter type based on the provided counter_type_info. The counter type will be automatically unregistered during system shutdown.
- Note
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.
- Return
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).
- 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.
- Parameters
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.helptext
: [in] A longer descriptive text shown to the user to explain the nature of the counters created from this type.version
: [in] The version of the counter type. This is currently expected to be set to HPX_PERFORMANCE_COUNTER_V1.create_counter
: [in] The function which will be called to create a new instance of this counter type.discover_counters
: [in] The function will be called to discover counter instances which can be created.uom
: [in] The unit of measure of the counter type (default: “”)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.
-
counter_status
-
namespace
-
namespace
hpx
-
namespace
performance_counters
Functions
-
std::vector<performance_counter>
discover_counters
(std::string const &name, error_code &ec = throws)¶
-
struct
performance_counter
: public components::client_base<performance_counter, server::base_performance_counter>¶ Public Types
-
using
base_type
= components::client_base<performance_counter, server::base_performance_counter>¶
Public Functions
-
performance_counter
()¶
-
performance_counter
(id_type const &id)¶
-
performance_counter
(future<id_type> &&id)¶
-
performance_counter
(hpx::future<performance_counter> &&c)¶
-
future<counter_info>
get_info
() const¶
-
counter_info
get_info
(launch::sync_policy, error_code &ec = throws) const¶
-
future<counter_value>
get_counter_value
(bool reset = false)¶
-
counter_value
get_counter_value
(launch::sync_policy, bool reset = false, error_code &ec = throws)¶
-
future<counter_value>
get_counter_value
() const¶
-
counter_value
get_counter_value
(launch::sync_policy, error_code &ec = throws) const¶
-
future<counter_values_array>
get_counter_values_array
(bool reset = false)¶
-
counter_values_array
get_counter_values_array
(launch::sync_policy, bool reset = false, error_code &ec = throws)¶
-
future<counter_values_array>
get_counter_values_array
() const¶
-
counter_values_array
get_counter_values_array
(launch::sync_policy, error_code &ec = throws) const¶
-
future<bool>
start
()¶
-
bool
start
(launch::sync_policy, error_code &ec = throws)¶
-
future<bool>
stop
()¶
-
bool
stop
(launch::sync_policy, error_code &ec = throws)¶
-
future<void>
reset
()¶
-
void
reset
(launch::sync_policy, error_code &ec = throws)¶
-
future<void>
reinit
(bool reset = true)¶
-
void
reinit
(launch::sync_policy, bool reset = true, error_code &ec = throws)¶
-
std::string
get_name
(launch::sync_policy, error_code &ec = throws) const¶
-
template<typename
T
>
Tget_value
(launch::sync_policy, bool reset = false, error_code &ec = throws)¶
-
template<typename
T
>
Tget_value
(launch::sync_policy, error_code &ec = throws) const¶
Private Static Functions
-
template<typename
T
>
static Textract_value
(future<counter_value> &&value)¶
-
using
-
std::vector<performance_counter>
-
namespace
-
namespace
hpx
-
namespace
performance_counters
-
struct
performance_counter_base
¶ Subclassed by hpx::performance_counters::server::base_performance_counter
Public Functions
-
virtual
~performance_counter_base
()¶ Destructor, needs to be virtual to allow for clean destruction of derived objects
-
virtual counter_info
get_counter_info
() const = 0¶
-
virtual counter_value
get_counter_value
(bool reset = false) = 0¶
-
virtual counter_values_array
get_counter_values_array
(bool reset = false) = 0¶
-
virtual void
reset_counter_value
() = 0¶
-
virtual void
set_counter_value
(counter_value const&) = 0¶
-
virtual bool
start
() = 0¶
-
virtual bool
stop
() = 0¶
-
virtual void
reinit
(bool reset) = 0¶
-
virtual
-
struct
-
namespace
-
namespace
hpx
-
namespace
performance_counters
-
class
performance_counter_set
¶ Public Functions
-
performance_counter_set
(bool print_counters_locally = false)¶ Create an empty set of performance counters.
-
performance_counter_set
(std::string const &names, bool reset = false)¶ Create a set of performance counters from a name, possibly containing wild-card characters
-
void
add_counters
(std::string const &names, bool reset = false, error_code &ec = throws)¶ Add more performance counters to the set based on the given name, possibly containing wild-card characters
-
void
add_counters
(std::vector<std::string> const &names, bool reset = false, error_code &ec = throws)¶
-
std::vector<counter_info>
get_counter_infos
() const¶ Retrieve the counter infos for all counters in this set.
-
std::vector<hpx::future<counter_value>>
get_counter_values
(bool reset = false) const¶ Retrieve the values for all counters in this set supporting this operation
-
std::vector<counter_value>
get_counter_values
(launch::sync_policy, bool reset = false, error_code &ec = throws) const¶
-
std::vector<hpx::future<counter_values_array>>
get_counter_values_array
(bool reset = false) const¶ Retrieve the array-values for all counters in this set supporting this operation
-
std::vector<counter_values_array>
get_counter_values_array
(launch::sync_policy, bool reset = false, error_code &ec = throws) const¶
-
void
reset
(launch::sync_policy, error_code &ec = throws)¶
-
bool
start
(launch::sync_policy, error_code &ec = throws)¶
-
bool
stop
(launch::sync_policy, error_code &ec = throws)¶
-
void
reinit
(launch::sync_policy, bool reset = true, error_code &ec = throws)¶
-
void
release
()¶ Release all references to counters in the set.
Protected Functions
-
bool
find_counter
(counter_info const &info, bool reset, error_code &ec)¶
Protected Static Functions
-
-
class
-
namespace
-
namespace
hpx
-
namespace
agas
Functions
-
void
primary_namespace_register_counter_types
(error_code &ec = throws)¶
-
void
-
namespace
-
namespace
hpx
-
namespace
util
-
class
query_counters
¶ Public Functions
-
query_counters
(std::vector<std::string> const &names, std::vector<std::string> const &reset_names, std::int64_t interval, std::string const &dest, std::string const &form, std::vector<std::string> const &shortnames, bool csv_header, bool print_counters_locally, bool counter_types)¶
-
~query_counters
()¶
-
void
start
()¶
-
void
stop_evaluating_counters
(bool terminate = false)¶
-
bool
evaluate
(bool force = false)¶
-
void
terminate
()¶
-
void
start_counters
(error_code &ec = throws)¶
-
void
stop_counters
(error_code &ec = throws)¶
-
void
reset_counters
(error_code &ec = throws)¶
-
void
reinit_counters
(bool reset = true, error_code &ec = throws)¶
-
bool
evaluate_counters
(bool reset = false, char const *description = nullptr, bool force = false, error_code &ec = throws)¶
Protected Functions
-
void
find_counters
()¶
-
bool
print_raw_counters
(bool destination_is_cout, bool reset, bool no_output, char const *description, std::vector<performance_counters::counter_info> const &infos, error_code &ec)¶
-
bool
print_array_counters
(bool destination_is_cout, bool reset, bool no_output, char const *description, std::vector<performance_counters::counter_info> const &infos, error_code &ec)¶
-
template<typename
Stream
>
voidprint_headers
(Stream &output, std::vector<performance_counters::counter_info> const &infos)¶
-
template<typename
Stream
, typenameFuture
>
voidprint_values
(Stream *output, std::vector<Future>&&, std::vector<std::size_t> &&indices, std::vector<performance_counters::counter_info> const &infos)¶
-
template<typename
Stream
>
voidprint_value
(Stream *out, performance_counters::counter_info const &infos, performance_counters::counter_value const &value)¶
-
template<typename
Stream
>
voidprint_value
(Stream *out, performance_counters::counter_info const &infos, performance_counters::counter_values_array const &value)¶
-
template<typename
Stream
>
voidprint_value_csv
(Stream *out, performance_counters::counter_info const &infos, performance_counters::counter_value const &value)¶
-
template<typename
Stream
>
voidprint_value_csv
(Stream *out, performance_counters::counter_info const &infos, performance_counters::counter_values_array const &value)¶
Private Functions
-
query_counters *
this_
()¶
Private Members
-
mutex_type
mtx_
¶
-
performance_counters::performance_counter_set
counters_
¶
-
bool
csv_header_
¶
-
bool
print_counters_locally_
¶
-
bool
counter_types_
¶
-
interval_timer
timer_
¶
-
-
class
-
namespace
-
namespace
hpx
-
namespace
performance_counters
-
class
registry
¶ Public Functions
-
registry
()¶
-
void
clear
()¶ Reset registry by deleting all stored counter types.
-
counter_status
add_counter_type
(counter_info const &info, create_counter_func const &create_counter, discover_counters_func const &discover_counters, error_code &ec = throws)¶ Add a new performance counter type to the (local) registry.
-
counter_status
discover_counter_types
(discover_counter_func discover_counter, discover_counters_mode mode, error_code &ec = throws)¶ Call the supplied function for all registered counter types.
-
counter_status
discover_counter_type
(std::string const &fullname, discover_counter_func discover_counter, discover_counters_mode mode, error_code &ec = throws)¶ Call the supplied function for the given registered counter type.
-
counter_status
discover_counter_type
(counter_info const &info, discover_counter_func const &f, discover_counters_mode mode, error_code &ec = throws)¶
-
counter_status
get_counter_create_function
(counter_info const &info, create_counter_func &create_counter, error_code &ec = throws) const¶ Retrieve the counter creation function which is associated with a given counter type.
-
counter_status
get_counter_discovery_function
(counter_info const &info, discover_counters_func &func, error_code &ec) const¶ Retrieve the counter discovery function which is associated with a given counter type.
-
counter_status
remove_counter_type
(counter_info const &info, error_code &ec = throws)¶ Remove an existing counter type from the (local) registry.
- Note
This doesn’t remove existing counters of this type, it just inhibits defining new counters using this type.
-
counter_status
create_raw_counter_value
(counter_info const &info, std::int64_t *countervalue, naming::gid_type &id, error_code &ec = throws)¶ Create a new performance counter instance of type raw_counter based on given counter value.
-
counter_status
create_raw_counter
(counter_info const &info, hpx::util::function_nonser<std::int64_t()> const &fnaming::gid_type &id, error_code &ec = throws, )¶ Create a new performance counter instance of type raw_counter based on given function returning the counter value.
-
counter_status
create_raw_counter
(counter_info const &info, hpx::util::function_nonser<std::int64_t(bool)> const &f, naming::gid_type &id, error_code &ec = throws, )¶ Create a new performance counter instance of type raw_counter based on given function returning the counter value.
-
counter_status
create_raw_counter
(counter_info const &info, hpx::util::function_nonser<std::vector<std::int64_t>()> const &fnaming::gid_type &id, error_code &ec = throws, )¶ Create a new performance counter instance of type raw_counter based on given function returning the counter value.
-
counter_status
create_raw_counter
(counter_info const &info, hpx::util::function_nonser<std::vector<std::int64_t>(bool)> const &f, naming::gid_type &id, error_code &ec = throws, )¶ Create a new performance counter instance of type raw_counter based on given function returning the counter value.
-
counter_status
create_counter
(counter_info const &info, naming::gid_type &id, error_code &ec = throws)¶ Create a new performance counter instance based on given counter info.
-
counter_status
create_statistics_counter
(counter_info const &info, std::string const &base_counter_name, std::vector<std::size_t> const ¶meters, naming::gid_type &id, error_code &ec = throws)¶ Create a new statistics performance counter instance based on given base counter name and given base time interval (milliseconds).
-
counter_status
create_arithmetics_counter
(counter_info const &info, std::vector<std::string> const &base_counter_names, naming::gid_type &id, error_code &ec = throws)¶ Create a new arithmetics performance counter instance based on given base counter names.
-
counter_status
create_arithmetics_counter_extended
(counter_info const &info, std::vector<std::string> const &base_counter_names, naming::gid_type &id, error_code &ec = throws)¶ Create a new extended arithmetics performance counter instance based on given base counter names.
-
counter_status
add_counter
(naming::id_type const &id, counter_info const &info, error_code &ec = throws)¶ Add an existing performance counter instance to the registry.
-
counter_status
remove_counter
(counter_info const &info, naming::id_type const &id, error_code &ec = throws)¶ remove the existing performance counter from the registry
-
counter_status
get_counter_type
(std::string const &name, counter_info &info, error_code &ec = throws)¶ Retrieve counter type information for given counter name.
Protected Functions
-
counter_type_map_type::iterator
locate_counter_type
(std::string const &type_name)¶
-
counter_type_map_type::const_iterator
locate_counter_type
(std::string const &type_name) const¶
Private Types
-
typedef std::map<std::string, counter_data>
counter_type_map_type
¶
Private Members
-
counter_type_map_type
countertypes_
¶
-
struct
counter_data
¶ Public Functions
-
counter_data
(counter_info const &info, create_counter_func const &create_counter, discover_counters_func const &discover_counters)¶
Public Members
-
counter_info
info_
¶
-
create_counter_func
create_counter_
¶
-
discover_counters_func
discover_counters_
¶
-
-
-
class
-
namespace
-
namespace
hpx
-
namespace
agas
Functions
-
void
symbol_namespace_register_counter_types
(error_code &ec = throws)¶
-
void
-
namespace
-
namespace
hpx
-
namespace
performance_counters
Functions
-
void
register_threadmanager_counter_types
(threads::threadmanager &tm)¶
-
void
-
namespace
-
namespace
hpx
-
namespace
performance_counters
-
namespace
server
¶ -
template<typename
Operation
>
classarithmetics_counter
: public hpx::performance_counters::server::base_performance_counter, public components::component_base<arithmetics_counter<Operation>>¶ Public Types
-
template<>
usingtype_holder
= arithmetics_counter¶
-
template<>
usingbase_type_holder
= base_performance_counter¶
Public Functions
-
arithmetics_counter
()¶
-
arithmetics_counter
(counter_info const &info, std::vector<std::string> const &base_counter_names)¶
-
hpx::performance_counters::counter_value
get_counter_value
(bool reset = false)¶ Overloads from the base_counter base class.
-
bool
start
()¶
-
bool
stop
()¶
-
void
reset_counter_value
()¶
-
void
finalize
()¶
Private Types
-
template<>
usingbase_type
= components::component_base<arithmetics_counter<Operation>>¶
Private Members
-
performance_counter_set
counters_
¶
-
template<>
-
template<typename
-
namespace
-
namespace
-
namespace
hpx
-
namespace
performance_counters
-
namespace
server
-
template<typename
Statistic
>
classarithmetics_counter_extended
: public hpx::performance_counters::server::base_performance_counter, public components::component_base<arithmetics_counter_extended<Statistic>>¶ Public Types
-
template<>
usingtype_holder
= arithmetics_counter_extended¶
-
template<>
usingbase_type_holder
= base_performance_counter¶
Public Functions
-
arithmetics_counter_extended
()¶
-
arithmetics_counter_extended
(counter_info const &info, std::vector<std::string> const &base_counter_names)¶
-
hpx::performance_counters::counter_value
get_counter_value
(bool reset = false)¶ Overloads from the base_counter base class.
-
bool
start
()¶
-
bool
stop
()¶
-
void
reset_counter_value
()¶
-
void
finalize
()¶
Private Types
-
template<>
usingbase_type
= components::component_base<arithmetics_counter_extended<Statistic>>¶
Private Members
-
performance_counter_set
counters_
¶
-
template<>
-
template<typename
-
namespace
-
namespace
-
namespace
hpx
-
namespace
performance_counters
-
namespace
server
-
class
base_performance_counter
: public hpx::performance_counters::performance_counter_base, public component_tag¶ Subclassed by hpx::performance_counters::server::arithmetics_counter< Operation >, hpx::performance_counters::server::arithmetics_counter_extended< Statistic >, hpx::performance_counters::server::elapsed_time_counter, hpx::performance_counters::server::raw_counter, hpx::performance_counters::server::raw_values_counter, hpx::performance_counters::server::statistics_counter< Statistic >
Public Types
-
using
wrapping_type
= components::component<base_performance_counter>¶
-
using
base_type_holder
= base_performance_counter¶
Public Functions
-
base_performance_counter
()¶
-
base_performance_counter
(counter_info const &info)¶
-
constexpr void
finalize
()¶ finalize() will be called just before the instance gets destructed
-
counter_info
get_counter_info_nonvirt
() const¶
-
counter_value
get_counter_value_nonvirt
(bool reset)¶
-
counter_values_array
get_counter_values_array_nonvirt
(bool reset)¶
-
void
set_counter_value_nonvirt
(counter_value const &info)¶
-
void
reset_counter_value_nonvirt
()¶
-
bool
start_nonvirt
()¶
-
bool
stop_nonvirt
()¶
-
void
reinit_nonvirt
(bool reset)¶
-
HPX_DEFINE_COMPONENT_ACTION
(base_performance_counter, get_counter_info_nonvirt, get_counter_info_action)¶ Each of the exposed functions needs to be encapsulated into an action type, allowing to generate all required boilerplate code for threads, serialization, etc. The get_counter_info_action retrieves a performance counters information.
-
HPX_DEFINE_COMPONENT_ACTION
(base_performance_counter, get_counter_value_nonvirt, get_counter_value_action)¶ The get_counter_value_action queries the value of a performance counter.
-
HPX_DEFINE_COMPONENT_ACTION
(base_performance_counter, get_counter_values_array_nonvirt, get_counter_values_array_action)¶ The get_counter_value_action queries the value of a performance counter.
-
HPX_DEFINE_COMPONENT_ACTION
(base_performance_counter, set_counter_value_nonvirt, set_counter_value_action)¶ The set_counter_value_action.
-
HPX_DEFINE_COMPONENT_ACTION
(base_performance_counter, reset_counter_value_nonvirt, reset_counter_value_action)¶ The reset_counter_value_action.
-
HPX_DEFINE_COMPONENT_ACTION
(base_performance_counter, start_nonvirt, start_action)¶ The start_action.
-
HPX_DEFINE_COMPONENT_ACTION
(base_performance_counter, stop_nonvirt, stop_action)¶ The stop_action.
-
HPX_DEFINE_COMPONENT_ACTION
(base_performance_counter, reinit_nonvirt, reinit_action)¶ The reinit_action.
Public Static Functions
-
static components::component_type
get_component_type
()¶
-
static void
set_component_type
(components::component_type t)¶
Protected Functions
-
void
reset_counter_value
()¶ the following functions are not implemented by default, they will just throw
-
void
set_counter_value
(counter_value const&)¶
-
counter_value
get_counter_value
(bool)¶
-
counter_values_array
get_counter_values_array
(bool)¶
-
bool
start
()¶
-
bool
stop
()¶
-
void
reinit
(bool)¶
-
counter_info
get_counter_info
() const¶
Protected Attributes
-
hpx::performance_counters::counter_info
info_
¶
-
util::atomic_count
invocation_count_
¶
-
using
-
class
-
namespace
-
namespace
-
namespace
hpx
-
namespace
agas
-
namespace
-
namespace
hpx
-
namespace
performance_counters
-
namespace
server
-
class
elapsed_time_counter
: public hpx::performance_counters::server::base_performance_counter, public components::component_base<elapsed_time_counter>¶ Public Types
-
using
type_holder
= elapsed_time_counter¶
-
using
base_type_holder
= base_performance_counter¶
Public Functions
-
elapsed_time_counter
()¶
-
elapsed_time_counter
(counter_info const &info)¶
-
hpx::performance_counters::counter_value
get_counter_value
(bool reset)¶
-
void
reset_counter_value
()¶ the following functions are not implemented by default, they will just throw
-
bool
start
()¶
-
bool
stop
()¶
-
void
finalize
()¶
Private Types
-
using
base_type
= components::component_base<elapsed_time_counter>¶
-
using
-
class
-
namespace
-
namespace
-
namespace
hpx
-
namespace
agas
-
namespace
-
namespace
hpx
-
namespace
agas
-
namespace
-
namespace
hpx
-
namespace
performance_counters
-
namespace
server
-
class
raw_counter
: public hpx::performance_counters::server::base_performance_counter, public components::component_base<raw_counter>¶ -
Public Functions
-
raw_counter
()¶
-
raw_counter
(counter_info const &info, hpx::util::function_nonser<std::int64_t(bool)> f)¶
-
hpx::performance_counters::counter_value
get_counter_value
(bool reset = false)¶
-
void
reset_counter_value
()¶ the following functions are not implemented by default, they will just throw
-
void
finalize
()¶
Private Types
-
using
base_type
= components::component_base<raw_counter>¶
-
-
class
-
namespace
-
namespace
-
namespace
hpx
-
namespace
performance_counters
-
namespace
server
-
class
raw_values_counter
: public hpx::performance_counters::server::base_performance_counter, public components::component_base<raw_values_counter>¶ Public Types
-
using
type_holder
= raw_values_counter¶
-
using
base_type_holder
= base_performance_counter¶
Public Functions
-
raw_values_counter
()¶
-
raw_values_counter
(counter_info const &info, hpx::util::function_nonser<std::vector<std::int64_t>(bool)> f)¶
-
hpx::performance_counters::counter_values_array
get_counter_values_array
(bool reset = false)¶
-
void
reset_counter_value
()¶ the following functions are not implemented by default, they will just throw
-
void
finalize
()¶
Private Types
-
using
base_type
= components::component_base<raw_values_counter>¶
Private Members
-
hpx::util::function_nonser<std::vector<std::int64_t>bool)> hpx::performance_counters::server::raw_values_counter::f_
-
bool
reset_
¶
-
using
-
class
-
namespace
-
namespace
-
namespace
hpx
-
namespace
performance_counters
-
namespace
server
-
template<typename
Statistic
>
classstatistics_counter
: public hpx::performance_counters::server::base_performance_counter, public components::component_base<statistics_counter<Statistic>>¶ Public Types
-
typedef statistics_counter
type_holder
¶
-
typedef base_performance_counter
base_type_holder
¶
Public Functions
-
statistics_counter
()¶
-
statistics_counter
(counter_info const &info, std::string const &base_counter_name, std::size_t parameter1, std::size_t parameter2, bool reset_base_counter)¶
-
hpx::performance_counters::counter_value
get_counter_value
(bool reset = false)¶ Overloads from the base_counter base class.
-
bool
start
()¶
-
bool
stop
()¶
-
void
reset_counter_value
()¶ the following functions are not implemented by default, they will just throw
-
void
on_terminate
()¶
-
void
finalize
()¶
Protected Functions
-
bool
evaluate_base_counter
(counter_value &value)¶
-
bool
evaluate
()¶
-
bool
ensure_base_counter
()¶
Private Types
-
typedef components::component_base<statistics_counter<Statistic>>
base_type
¶
Private Functions
-
statistics_counter *
this_
()¶
Private Members
-
mutex_type
mtx_
¶
-
hpx::util::interval_timer
timer_
¶
-
counter_value
prev_value_
¶
-
bool
has_prev_value_
¶
-
bool
reset_base_counter_
¶
-
typedef statistics_counter
-
template<typename
-
namespace
-
namespace
-
namespace
hpx
-
namespace
agas
-
namespace