From 8ebaf9200649e990dbf852200a8a092f4ffdc6cd Mon Sep 17 00:00:00 2001 From: Quantum Date: Tue, 3 Aug 2021 17:39:44 -0400 Subject: [PATCH] [client] main: rename frameTimings to uploadTimings --- client/src/main.c | 11 ++++------- client/src/main.h | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/client/src/main.c b/client/src/main.c index 1ef90455..d2c3f7cb 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -700,10 +700,7 @@ int main_frameThread(void * unused) g_state.lastFrameTime = t; if (g_state.lastFrameTimeValid) - { - const float fdelta = (float)delta / 1e6f; - ringbuffer_push(g_state.frameTimings, &fdelta); - } + ringbuffer_push(g_state.uploadTimings, &(float) { delta * 1e-6f }); g_state.lastFrameTimeValid = true; atomic_fetch_add_explicit(&g_state.frameCount, 1, memory_order_relaxed); @@ -831,10 +828,10 @@ static int lg_run(void) // initialize metrics ringbuffers g_state.renderTimings = ringbuffer_new(256, sizeof(float)); - g_state.frameTimings = ringbuffer_new(256, sizeof(float)); + g_state.uploadTimings = ringbuffer_new(256, sizeof(float)); g_state.renderDuration = ringbuffer_new(256, sizeof(float)); overlayGraph_register("FRAME" , g_state.renderTimings , 0.0f, 50.0f); - overlayGraph_register("UPLOAD", g_state.frameTimings , 0.0f, 50.0f); + overlayGraph_register("UPLOAD", g_state.uploadTimings , 0.0f, 50.0f); overlayGraph_register("RENDER", g_state.renderDuration, 0.0f, 2.0f); initImGuiKeyMap(g_state.io->KeyMap); @@ -1237,7 +1234,7 @@ static void lg_shutdown(void) // free metrics ringbuffers ringbuffer_free(&g_state.renderTimings); - ringbuffer_free(&g_state.frameTimings ); + ringbuffer_free(&g_state.uploadTimings); ringbuffer_free(&g_state.renderDuration); free(g_state.fontName); diff --git a/client/src/main.h b/client/src/main.h index f6022896..35d11393 100644 --- a/client/src/main.h +++ b/client/src/main.h @@ -120,7 +120,7 @@ struct AppState bool lastRenderTimeValid; RingBuffer renderTimings; RingBuffer renderDuration; - RingBuffer frameTimings; + RingBuffer uploadTimings; atomic_uint_least64_t pendingCount; atomic_uint_least64_t renderCount, frameCount;