aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/core/probes.cpp
blob: 7ace83e10206fe4dc7ee76ab0077f04a4ec4057e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "probes.h"

#include "actorsystem.h"

#include <util/string/builder.h>

LWTRACE_DEFINE_PROVIDER(ACTORLIB_PROVIDER);

namespace NActors {
    TVector<NLWTrace::TDashboard> LWTraceDashboards(TActorSystemSetup* setup) {
        TVector<NLWTrace::TDashboard> result;

        NLWTrace::TDashboard slowDash;
        ui32 pools = setup->GetExecutorsCount();
        size_t top = 30;
        slowDash.SetName("ActorSystem slow events");
        slowDash.SetDescription(TStringBuilder() << "TOP" << top << " slow event executions >1M cycles for every pool (refresh page to update)");
        for (ui32 pool = 0; pool < pools; pool++) {
            auto* row = slowDash.AddRows();
            auto* cell = row->AddCells();
            cell->SetTitle(TStringBuilder() << pool << ":" << setup->GetPoolName(pool));
            cell->SetUrl(TStringBuilder() << "?mode=log&id=.ACTORLIB_PROVIDER.SlowEvent.ppoolId=" << pool << "&s=eventMs&reverse=y&head=30");
        }
        result.push_back(slowDash);

        return result;
    }
}