Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

feat(new_metrics): implement the counter #1081

Merged
merged 8 commits into from
Mar 25, 2022

Conversation

empiredan
Copy link
Contributor

include/dsn/utility/metrics.h Outdated Show resolved Hide resolved
include/dsn/utility/metrics.h Outdated Show resolved Hide resolved
}

template <typename Adder>
void run_counter_increment_by(::dsn::counter_ptr<Adder> &my_metric,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

::dsn::counter_ptr &my_metric
==>
dsn::counter_ptr &my_metric

// higher performance while consuming more memory if it's updated very frequently.
// See also include/dsn/utility/long_adder.h for details.
#define METRIC_DEFINE_counter(entity_type, name, unit, desc, ...) \
::dsn::counter_prototype<::dsn::striped_long_adder> METRIC_##name( \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@acelyc111 acelyc111 merged commit 863325b into XiaoMi:prometheus-dev Mar 25, 2022
acelyc111 pushed a commit to acelyc111/rdsn that referenced this pull request Jun 17, 2022
empiredan added a commit to empiredan/rdsn that referenced this pull request Jun 17, 2022
empiredan added a commit to empiredan/rdsn that referenced this pull request Jun 20, 2022
empiredan added a commit to empiredan/rdsn that referenced this pull request Jun 20, 2022
acelyc111 pushed a commit to acelyc111/rdsn that referenced this pull request Jun 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants