aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/dynamic_counters/counters.h
diff options
context:
space:
mode:
authorCthulhu <cthulhu@yandex-team.ru>2022-02-10 16:47:44 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:44 +0300
commit6aced6c854653b75aab9808d5995be5fc4d9fa53 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/monlib/dynamic_counters/counters.h
parentbcb3e9d0eb2a8188a6a9fe0907a8949ce4881a4e (diff)
downloadydb-6aced6c854653b75aab9808d5995be5fc4d9fa53.tar.gz
Restoring authorship annotation for Cthulhu <cthulhu@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/dynamic_counters/counters.h')
-rw-r--r--library/cpp/monlib/dynamic_counters/counters.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/monlib/dynamic_counters/counters.h b/library/cpp/monlib/dynamic_counters/counters.h
index b5951a2f6c..dc178cfbe0 100644
--- a/library/cpp/monlib/dynamic_counters/counters.h
+++ b/library/cpp/monlib/dynamic_counters/counters.h
@@ -191,12 +191,12 @@ namespace NMonitoring {
struct TDynamicCounters: public TCountableBase {
public:
using TCounterPtr = TIntrusivePtr<TCounterForPtr>;
- using TOnLookupPtr = void (*)(const char *methodName, const TString &name, const TString &value);
+ using TOnLookupPtr = void (*)(const char *methodName, const TString &name, const TString &value);
private:
TRWMutex Lock;
TCounterPtr LookupCounter; // Counts lookups by name
- TOnLookupPtr OnLookup = nullptr; // Called on each lookup if not nullptr, intended for lightweight tracing.
+ TOnLookupPtr OnLookup = nullptr; // Called on each lookup if not nullptr, intended for lightweight tracing.
typedef TIntrusivePtr<TCountableBase> TCountablePtr;
@@ -247,11 +247,11 @@ namespace NMonitoring {
LookupCounter = lookupCounter;
}
- void SetOnLookup(TOnLookupPtr onLookup) {
+ void SetOnLookup(TOnLookupPtr onLookup) {
TWriteGuard g(Lock);
- OnLookup = onLookup;
- }
-
+ OnLookup = onLookup;
+ }
+
TWriteGuard LockForUpdate(const char *method, const TString& name, const TString& value) {
auto res = TWriteGuard(Lock);
if (LookupCounter) {