hpx/performance_counters/counters_fwd.hpp¶
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace
hpx
-
namespace
performance_counters
Enums
-
enum
counter_type
Values:
-
text
text shows a variable-length text string. It does not deliver calculated values.
Formula: None Average: None Type: Text
-
raw
raw shows the last observed value only. It does not deliver an average.
Formula: None. Shows raw data as collected. Average: None Type: Instantaneous
-
monotonically_increasing
monotonically_increasing shows the cumulatively accumulated observed value. It does not deliver an average.
Formula: None. Shows cumulatively accumulated data as collected. Average: None Type: Instantaneous
-
average_base
average_base is used as the base data (denominator) in the computation of time or count averages for the counter_type::average_count and counter_type::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
-
average_count
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
-
aggregating
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)
-
average_timer
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
-
elapsed_time
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
-
histogram
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.
-
raw_values
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.
-
text
-
raw
-
monotonically_increasing
-
average_base
-
average_count
-
aggregating
-
average_timer
-
elapsed_time
-
histogram
-
raw_values
raw_values counter 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
-
constexpr bool
operator<
(counter_type lhs, counter_type rhs)¶
-
constexpr bool
operator>
(counter_type lhs, counter_type rhs)¶
-
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.
-
hpx::future<hpx::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.
-
hpx::future<hpx::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.
Variables
-
constexpr counter_type
counter_text
= counter_type::text¶
-
constexpr counter_type
counter_raw
= counter_type::raw¶
-
constexpr counter_type
counter_monotonically_increasing
= counter_type::monotonically_increasing¶
-
constexpr counter_type
counter_average_base
= counter_type::average_base¶
-
constexpr counter_type
counter_average_count
= counter_type::average_count¶
-
constexpr counter_type
counter_aggregating
= counter_type::aggregating¶
-
constexpr counter_type
counter_average_timer
= counter_type::average_timer¶
-
constexpr counter_type
counter_elapsed_time
= counter_type::elapsed_time¶
-
constexpr counter_type
counter_raw_values
= counter_type::raw_values¶
-
constexpr counter_type
counter_histogram
= counter_type::histogram¶
-
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