probes.cpp 1.0 KB

12345678910111213141516171819202122232425262728
  1. #include "probes.h"
  2. #include "actorsystem.h"
  3. #include <util/string/builder.h>
  4. LWTRACE_DEFINE_PROVIDER(ACTORLIB_PROVIDER);
  5. namespace NActors {
  6. TVector<NLWTrace::TDashboard> LWTraceDashboards(TActorSystemSetup* setup) {
  7. TVector<NLWTrace::TDashboard> result;
  8. NLWTrace::TDashboard slowDash;
  9. ui32 pools = setup->GetExecutorsCount();
  10. size_t top = 30;
  11. slowDash.SetName("ActorSystem slow events");
  12. slowDash.SetDescription(TStringBuilder() << "TOP" << top << " slow event executions >1M cycles for every pool (refresh page to update)");
  13. for (ui32 pool = 0; pool < pools; pool++) {
  14. auto* row = slowDash.AddRows();
  15. auto* cell = row->AddCells();
  16. cell->SetTitle(TStringBuilder() << pool << ":" << setup->GetPoolName(pool));
  17. cell->SetUrl(TStringBuilder() << "?mode=log&id=.ACTORLIB_PROVIDER.SlowEvent.ppoolId=" << pool << "&s=eventMs&reverse=y&head=30");
  18. }
  19. result.push_back(slowDash);
  20. return result;
  21. }
  22. }