aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/helpers
diff options
context:
space:
mode:
authorkruall <kruall@yandex-team.ru>2022-02-10 16:50:43 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:43 +0300
commit08510f0e20c4cccf75a4a7577b1471638c521f08 (patch)
tree9fd60922961d950d6761fcb0c694bcfca6594c9a /library/cpp/actors/helpers
parentce384ae51a2d2c465e4e0fe4fe0346e382459bfe (diff)
downloadydb-08510f0e20c4cccf75a4a7577b1471638c521f08.tar.gz
Restoring authorship annotation for <kruall@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/actors/helpers')
-rw-r--r--library/cpp/actors/helpers/selfping_actor.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/actors/helpers/selfping_actor.cpp b/library/cpp/actors/helpers/selfping_actor.cpp
index f9bfaf8dc09..50df38e972e 100644
--- a/library/cpp/actors/helpers/selfping_actor.cpp
+++ b/library/cpp/actors/helpers/selfping_actor.cpp
@@ -67,8 +67,8 @@ private:
NSlidingWindow::TSlidingWindow<NSlidingWindow::TMaxOperation<ui64>> SlidingWindow;
NSlidingWindow::TSlidingWindow<TAvgOperation<ui64>> CalculationSlidingWindow;
- THPTimer Timer;
-
+ THPTimer Timer;
+
public:
static constexpr auto ActorActivityType() {
return SELF_PING_ACTOR;
@@ -87,7 +87,7 @@ public:
void Bootstrap(const TActorContext& ctx)
{
Become(&TSelfPingActor::RunningState);
- SchedulePing(ctx, Timer.Passed());
+ SchedulePing(ctx, Timer.Passed());
}
STFUNC(RunningState)
@@ -148,23 +148,23 @@ public:
void HandlePing(TEvPing::TPtr &ev, const TActorContext &ctx)
{
- const auto now = ctx.Now();
- const double hpNow = Timer.Passed();
+ const auto now = ctx.Now();
+ const double hpNow = Timer.Passed();
const auto& e = *ev->Get();
- const double passedTime = hpNow - e.TimeStart;
- const ui64 delayUs = passedTime > 0.0 ? static_cast<ui64>(passedTime * 1e6) : 0;
+ const double passedTime = hpNow - e.TimeStart;
+ const ui64 delayUs = passedTime > 0.0 ? static_cast<ui64>(passedTime * 1e6) : 0;
- *Counter = SlidingWindow.Update(delayUs, now);
+ *Counter = SlidingWindow.Update(delayUs, now);
ui64 d = MeasureTaskDurationNs();
- auto res = CalculationSlidingWindow.Update({1, d}, now);
+ auto res = CalculationSlidingWindow.Update({1, d}, now);
*CalculationTimeCounter = double(res.Sum) / double(res.Count + 1);
- SchedulePing(ctx, hpNow);
+ SchedulePing(ctx, hpNow);
}
private:
- void SchedulePing(const TActorContext &ctx, double hpNow) const
+ void SchedulePing(const TActorContext &ctx, double hpNow) const
{
ctx.Schedule(SendInterval, new TEvPing(hpNow));
}