mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 02:43:44 +00:00
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>
26 lines
809 B
C++
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();
|
|
}
|