Files
DarkflameServer/dDashboardServer/routes/Performance.h
Aaron Kimbrell 992abf9d8a feat(dashboard): Performance page with frame times, slow frames and flame graphs
The dashboard's own loop is framed too, with a scope per module update. Frame time and stacked phase charts per server, the servers' loop summary, longest frames, packet handling times, the last 50 slow frames with a nested timeline, and profiling sessions (profiling_run, GM 8) drawn as a flame graph with folded stacks to download. PerfHistory keeps it in memory and is unit tested; the layouts are tested with node. Task 96.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 22:26:17 -05:00

26 lines
809 B
C++

#pragma once
#include <string>
#include "Profiler.h"
struct ProfileResult;
/**
* The Performance page (docs/Dashboard.md, "Performance"): every server's main loop frame times and phases, its worst
* and slow frames, and profiling sessions with a flame graph. Frame timing comes with the traffic reports; sessions go
* out as PROFILE_REQUEST through master and come back as PROFILE_RESULT.
*/
namespace Performance {
void RegisterRoutes();
// A traffic report's frames section (Traffic::Ingest passes it on)
void Ingest(const std::string& serverKey, const Profiler::Report& frames);
// PROFILE_RESULT from a server (via master), or the dashboard's own
void IngestProfile(const ProfileResult& result);
// Main loop: forget old seconds, give up on sessions that never answered
void Update();
}