QcDebugSnapshot Struct
Everything the debug display, the control interface and the statistics log show, at one moment (decision E-225). More...
| Header: | #include <clientcore/debug/QcDebugSnapshot.h> |
Public Types
Public Functions
| QcBlockPos | block() const |
Public Variables
| qint64 | blockBytes |
| quint64 | clientTick |
| QcDebugSnapshot::Entities | entities |
| QcLightProbe::Levels | feetLight |
| double | footprintMb |
| std::optional<QcDebugSnapshot::Frame> | frame |
| std::optional<QcRoundTripSummary> | latency |
| qsizetype | loadedChunks |
| double | memoryMb |
| double | peakMemoryMb |
| float | pitch |
| QcVec3 | position |
| quint32 | protocol |
| qint64 | seed |
| std::optional<QcMsg::ServerDebug> | server |
| std::optional<QcDebugSnapshot::Target> | target |
| QString | targetEntity |
| QString | worldName |
| float | yaw |
Static Public Members
| QcDebugSnapshot | collect(const QcClientSession &session, const std::optional<QcVec3> &feet = std::nullopt) |
| const char * | facing(float yaw) |
| int | facingIndex(float yaw) |
Related Non-Members
| enum class | QcFramePhase { Interval, GuiCpu, EntityMesh, Preview, RenderCpu, …, Gpu } |
Detailed Description
Plain data: collected from a session (and, in the graphical game, the frame statistics), then written as text lines (QcDebugText) or JSON (QcDebugJson).
Member Function Documentation
QcBlockPos QcDebugSnapshot::block() const
Returns the block containing the feet, its chunk and section.
[static] QcDebugSnapshot QcDebugSnapshot::collect(const QcClientSession &session, const std::optional<QcVec3> &feet = std::nullopt)
Returns the state of session now, without the frame statistics. feet is where the player is shown (interpolated between ticks in the graphical game); without it, the session's position.
[static] const char *QcDebugSnapshot::facing(float yaw)
Returns the main direction of yaw: "north", "east", "south" or "west".
[static] int QcDebugSnapshot::facingIndex(float yaw)
Returns the main direction of yaw (0 looks north, -Z): 0 north, 1 east, 2 south, 3 west.
Member Variable Documentation
qint64 QcDebugSnapshot::blockBytes
The blocks of the loaded chunks (QcClientWorld::memory, decision E-813).
quint64 QcDebugSnapshot::clientTick
Client ticks since the start (QcClientSession::tickCount).
QcDebugSnapshot::Entities QcDebugSnapshot::entities
The entities by kind.
QcLightProbe::Levels QcDebugSnapshot::feetLight
Light in the cell of the feet.
double QcDebugSnapshot::footprintMb
Physical footprint of the process now, in MB (macOS: with GPU memory).
std::optional<QcDebugSnapshot::Frame> QcDebugSnapshot::frame
The frame statistics; only in the graphical game.
std::optional<QcRoundTripSummary> QcDebugSnapshot::latency
The round trip to the server (decision E-886); also in single player, where it is nearly 0.
qsizetype QcDebugSnapshot::loadedChunks
Loaded chunks.
double QcDebugSnapshot::memoryMb
Resident memory of the process now, in MB.
double QcDebugSnapshot::peakMemoryMb
Highest resident memory of the process so far, in MB.
float QcDebugSnapshot::pitch
The player's head pitch, in degrees.
QcVec3 QcDebugSnapshot::position
Where the player's feet are.
quint32 QcDebugSnapshot::protocol
The protocol version.
qint64 QcDebugSnapshot::seed
The world's seed.
std::optional<QcMsg::ServerDebug> QcDebugSnapshot::server
The latest debug data of the server; nothing without a subscription.
std::optional<QcDebugSnapshot::Target> QcDebugSnapshot::target
The block under the crosshair; nothing when none is targeted.
QString QcDebugSnapshot::targetEntity
Name and id of the creature or player under the crosshair.
QString QcDebugSnapshot::worldName
The world's name.
float QcDebugSnapshot::yaw
Where the player faces, in degrees.
Related Non-Members
enum class QcFramePhase
Phases of a client frame for the debug display (decision E-225): the time between frames, CPU time of the GUI thread, its entity and hand meshing, the meshing of the character previews (decision E-231), CPU time of the render thread, the world renderer, its uploads and the GPU time of the window.
| Constant | Value | Description |
|---|---|---|
QcDebugSnapshot::QcFramePhase::Interval | 0 | time between frames |
QcDebugSnapshot::QcFramePhase::GuiCpu | 1 | CPU time of the GUI thread |
QcDebugSnapshot::QcFramePhase::EntityMesh | 2 | its entity and hand meshing |
QcDebugSnapshot::QcFramePhase::Preview | 3 | meshing of the character previews |
QcDebugSnapshot::QcFramePhase::RenderCpu | 4 | CPU time of the render thread |
QcDebugSnapshot::QcFramePhase::WorldRender | 5 | the world renderer |
QcDebugSnapshot::QcFramePhase::Upload | 6 | its uploads |
QcDebugSnapshot::QcFramePhase::Gpu | 7 | GPU time of the window |