Show predicted display time in plots

This commit is contained in:
Patrick Nicolas
2024-09-03 23:34:23 +02:00
parent 8328fe13c7
commit fe927dc732
3 changed files with 28 additions and 16 deletions
+20 -16
View File
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WiVRn 0.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-30 08:12+0200\n"
"POT-Creation-Date: 2024-08-31 08:56+0200\n"
"PO-Revision-Date: 2024-05-20 13:00+0200\n"
"Last-Translator: Guillaume Meunier <guillaume.meunier@centraliens.net>\n"
"Language: French\n"
@@ -134,7 +134,7 @@ msgid "Overlay can be toggled by pressing both thumbsticks"
msgstr "L'affichage peut être basculé en appuyant sur les deux joysticks"
#: client/scenes/lobby_gui.cpp:434 client/scenes/lobby_gui.cpp:442
#: client/scenes/stream_stats.cpp:143
#: client/scenes/stream_stats.cpp:144
msgid "CPU time"
msgstr "Temps CPU"
@@ -143,7 +143,7 @@ msgid "CPU time [ms]"
msgstr "Temps CPU [ms]"
#: client/scenes/lobby_gui.cpp:448 client/scenes/lobby_gui.cpp:456
#: client/scenes/stream_stats.cpp:145
#: client/scenes/stream_stats.cpp:146
msgid "GPU time"
msgstr "Temps GPU"
@@ -171,56 +171,60 @@ msgstr "À propos"
msgid "Exit"
msgstr "Quitter"
#: client/scenes/stream_stats.cpp:145
#: client/scenes/stream_stats.cpp:146
msgid "Reproject"
msgstr "Reprojection"
#: client/scenes/stream_stats.cpp:146
#: client/scenes/stream_stats.cpp:147
msgid "Blit"
msgstr "Copie"
#: client/scenes/stream_stats.cpp:148
#: client/scenes/stream_stats.cpp:149
msgid "Download"
msgstr "Téléchargement"
#: client/scenes/stream_stats.cpp:149
#: client/scenes/stream_stats.cpp:150
msgid "Upload"
msgstr "Téléversement"
#: client/scenes/stream_stats.cpp:218
#: client/scenes/stream_stats.cpp:219
#, c++-format
msgid "Decoder {}"
msgstr "Décodeur {}"
#: client/scenes/stream_stats.cpp:230
#: client/scenes/stream_stats.cpp:231
msgid "Timings [ms]"
msgstr "Durées [ms]"
#: client/scenes/stream_stats.cpp:285
#: client/scenes/stream_stats.cpp:291
msgid "Encode"
msgstr "Encodage"
#: client/scenes/stream_stats.cpp:286
#: client/scenes/stream_stats.cpp:292
msgid "Send"
msgstr "Envoi"
#: client/scenes/stream_stats.cpp:287
#: client/scenes/stream_stats.cpp:293
msgid "Receive"
msgstr "Réception"
#: client/scenes/stream_stats.cpp:288
#: client/scenes/stream_stats.cpp:294
msgid "Decode"
msgstr "Décodage"
#: client/scenes/stream_stats.cpp:289
#: client/scenes/stream_stats.cpp:295
msgid "Blitted"
msgstr "Copie"
#: client/scenes/stream_stats.cpp:290
#: client/scenes/stream_stats.cpp:296
msgid "Displayed"
msgstr "Affichage"
#: client/scenes/stream_stats.cpp:306
#: client/scenes/stream_stats.cpp:297
msgid "Predicted"
msgstr "Prédiction"
#: client/scenes/stream_stats.cpp:313
#, c++-format
msgid "Estimated motion to photons latency: {}ms"
msgstr "Latence mouvement à photons estimée: {}ms"
+1
View File
@@ -216,6 +216,7 @@ private:
float received_from_decoder;
float blitted;
float displayed;
float predicted_display;
};
std::vector<global_metric> global_metrics{300};
+7
View File
@@ -123,6 +123,7 @@ void scenes::stream::accumulate_metrics(XrTime predicted_display_time, const std
.received_from_decoder = (bh->feedback.received_from_decoder - min_encode_begin) * 1e-9f,
.blitted = (bh->feedback.blitted - min_encode_begin) * 1e-9f,
.displayed = (bh->feedback.displayed - min_encode_begin) * 1e-9f,
.predicted_display = (bh->view_info.display_time - min_encode_begin) * 1e-9f,
}: decoder_metric{};
// clang-format on
}
@@ -284,6 +285,11 @@ XrCompositionLayerQuad scenes::stream::plot_performance_metrics(XrTime predicted
.stride = sizeof(decoder_metric),
.multiplier = 1e3f};
getter_data getter_predicted{
.data = (uintptr_t) & (metrics.data()->predicted_display),
.stride = sizeof(decoder_metric),
.multiplier = 1e3f};
// clang-format off
ImPlot::PlotShadedG(_S("Encode"), getter, &getter_encode_begin, getter, &getter_encode_end, metrics.size());
ImPlot::PlotShadedG(_S("Send"), getter, &getter_send_begin, getter, &getter_send_end, metrics.size());
@@ -291,6 +297,7 @@ XrCompositionLayerQuad scenes::stream::plot_performance_metrics(XrTime predicted
ImPlot::PlotShadedG(_S("Decode"), getter, &getter_sent_to_decoder, getter, &getter_received_from_decoder, metrics.size());
ImPlot::PlotLineG(_S("Blitted"), getter, &getter_blitted, metrics.size());
ImPlot::PlotLineG(_S("Displayed"), getter, &getter_displayed, metrics.size());
ImPlot::PlotLineG(_S("Predicted"), getter, &getter_predicted, metrics.size());
// clang-format on
double x[] = {double(metrics_offset), double(metrics_offset)};