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
commit060ef9e9f480e214e1b7b56ad4b585db35e977ec (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/actors/helpers
parent08510f0e20c4cccf75a4a7577b1471638c521f08 (diff)
downloadydb-060ef9e9f480e214e1b7b56ad4b585db35e977ec.tar.gz
Restoring authorship annotation for <kruall@yandex-team.ru>. Commit 2 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 50df38e972e..f9bfaf8dc09 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));
}