-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ivanmorozov
committed
Oct 14, 2023
1 parent
3a0ef9c
commit b8a327d
Showing
24 changed files
with
198 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
ydb/core/tx/columnshard/blobs_action/counters/remove_declare.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "remove_declare.h" | ||
#include "storage.h" | ||
|
||
namespace NKikimr::NOlap::NBlobOperations { | ||
|
||
TRemoveDeclareCounters::TRemoveDeclareCounters(const TConsumerCounters& owner) | ||
: TBase(owner, "RemoveDeclare") | ||
{ | ||
RequestsCount = TBase::GetDeriviative("Requests/Count"); | ||
RequestBytes = TBase::GetDeriviative("Requests/Bytes"); | ||
|
||
RepliesCount = TBase::GetDeriviative("Replies/Count"); | ||
ReplyBytes = TBase::GetDeriviative("Replies/Bytes"); | ||
ReplyDurationBySize = TBase::GetHistogram("Replies/Duration/Bytes", NMonitoring::ExponentialHistogram(15, 2, 1)); | ||
ReplyDurationByCount = TBase::GetHistogram("Replies/Duration/Count", NMonitoring::ExponentialHistogram(15, 2, 1)); | ||
|
||
FailsCount = TBase::GetDeriviative("Fails/Count"); | ||
FailBytes = TBase::GetDeriviative("Fails/Bytes"); | ||
FailDurationBySize = TBase::GetHistogram("Fails/Duration/Bytes", NMonitoring::ExponentialHistogram(15, 2, 2)); | ||
FailDurationByCount = TBase::GetHistogram("Fails/Duration/Count", NMonitoring::ExponentialHistogram(15, 2, 2)); | ||
} | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
ydb/core/tx/columnshard/blobs_action/counters/remove_declare.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#pragma once | ||
#include <library/cpp/monlib/dynamic_counters/counters.h> | ||
#include <ydb/core/tx/columnshard/counters/common/owner.h> | ||
|
||
namespace NKikimr::NOlap::NBlobOperations { | ||
|
||
class TConsumerCounters; | ||
|
||
class TRemoveDeclareCounters: public NColumnShard::TCommonCountersOwner { | ||
private: | ||
using TBase = NColumnShard::TCommonCountersOwner; | ||
NMonitoring::TDynamicCounters::TCounterPtr RequestsCount; | ||
NMonitoring::TDynamicCounters::TCounterPtr RequestBytes; | ||
|
||
NMonitoring::TDynamicCounters::TCounterPtr RepliesCount; | ||
NMonitoring::TDynamicCounters::TCounterPtr ReplyBytes; | ||
NMonitoring::THistogramPtr ReplyDurationByCount; | ||
NMonitoring::THistogramPtr ReplyDurationBySize; | ||
|
||
NMonitoring::TDynamicCounters::TCounterPtr FailsCount; | ||
NMonitoring::TDynamicCounters::TCounterPtr FailBytes; | ||
NMonitoring::THistogramPtr FailDurationByCount; | ||
NMonitoring::THistogramPtr FailDurationBySize; | ||
public: | ||
TRemoveDeclareCounters(const TConsumerCounters& owner); | ||
|
||
void OnRequest(const ui64 bytes) const { | ||
RequestsCount->Add(1); | ||
RequestBytes->Add(bytes); | ||
} | ||
|
||
void OnReply(const ui64 bytes, const TDuration d) const { | ||
RepliesCount->Add(1); | ||
ReplyBytes->Add(bytes); | ||
ReplyDurationByCount->Collect((i64)d.MilliSeconds()); | ||
ReplyDurationBySize->Collect((i64)d.MilliSeconds(), (i64)bytes); | ||
} | ||
|
||
void OnFail(const ui64 bytes, const TDuration d) const { | ||
FailsCount->Add(1); | ||
FailBytes->Add(bytes); | ||
FailDurationByCount->Collect((i64)d.MilliSeconds()); | ||
FailDurationBySize->Collect((i64)d.MilliSeconds(), (i64)bytes); | ||
} | ||
}; | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
ydb/core/tx/columnshard/blobs_action/counters/remove_gc.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "remove_gc.h" | ||
#include "storage.h" | ||
|
||
namespace NKikimr::NOlap::NBlobOperations { | ||
|
||
TRemoveGCCounters::TRemoveGCCounters(const TConsumerCounters& owner) | ||
: TBase(owner, "RemoveGC") | ||
{ | ||
RequestsCount = TBase::GetDeriviative("Requests/Count"); | ||
RequestBytes = TBase::GetDeriviative("Requests/Bytes"); | ||
|
||
RepliesCount = TBase::GetDeriviative("Replies/Count"); | ||
ReplyBytes = TBase::GetDeriviative("Replies/Bytes"); | ||
|
||
FailsCount = TBase::GetDeriviative("Fails/Count"); | ||
FailBytes = TBase::GetDeriviative("Fails/Bytes"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#pragma once | ||
#include <library/cpp/monlib/dynamic_counters/counters.h> | ||
#include <ydb/core/tx/columnshard/counters/common/owner.h> | ||
|
||
namespace NKikimr::NOlap::NBlobOperations { | ||
|
||
class TConsumerCounters; | ||
|
||
class TRemoveGCCounters: public NColumnShard::TCommonCountersOwner { | ||
private: | ||
using TBase = NColumnShard::TCommonCountersOwner; | ||
NMonitoring::TDynamicCounters::TCounterPtr RequestsCount; | ||
NMonitoring::TDynamicCounters::TCounterPtr RequestBytes; | ||
|
||
NMonitoring::TDynamicCounters::TCounterPtr RepliesCount; | ||
NMonitoring::TDynamicCounters::TCounterPtr ReplyBytes; | ||
|
||
NMonitoring::TDynamicCounters::TCounterPtr FailsCount; | ||
NMonitoring::TDynamicCounters::TCounterPtr FailBytes; | ||
public: | ||
TRemoveGCCounters(const TConsumerCounters& owner); | ||
|
||
void OnRequest(const ui64 bytes) const { | ||
RequestsCount->Add(1); | ||
RequestBytes->Add(bytes); | ||
} | ||
|
||
void OnReply(const ui64 bytes) const { | ||
RepliesCount->Add(1); | ||
ReplyBytes->Add(bytes); | ||
} | ||
|
||
void OnFail(const ui64 bytes) const { | ||
FailsCount->Add(1); | ||
FailBytes->Add(bytes); | ||
} | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ SRCS( | |
read.cpp | ||
storage.cpp | ||
write.cpp | ||
remove_declare.cpp | ||
remove_gc.cpp | ||
) | ||
|
||
PEERDIR( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.