Skip to content
Mario Bielert edited this page Jun 29, 2017 · 5 revisions

The sync policy is used to create synchronous metrics. As the name suggests, such metrics are running synchronous to the actual instrumented application, i.e., the plugin is asked at every enter and leave event for a metric value.

The difference between the sync policy and the sync_strict policy is, that the sync_strict must provide a metric value, the sync can provide one.

This policy is mutually exclusive with the async policy and the sync_strict policy.

Required methods

template <class Proxy> bool get_optional_value(std::int32_t id, Proxy& p)

This function gets called at every enter and leave event.

Arguments:

  • id - the id returned to Score-p in add_counter() (See Base)
  • p - the Proxy used to write data

Returns:

  • bool - signifies, whether a value was written or not

Provided methods

This policy doesn't provide any methods.

See also

Clone this wiki locally