Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Measure end to end latency #1121

Closed
pierd opened this issue Oct 26, 2023 · 4 comments
Closed

Measure end to end latency #1121

pierd opened this issue Oct 26, 2023 · 4 comments
Assignees
Labels
topic:networking Networking, including protocol and transmission medium

Comments

@pierd
Copy link
Contributor

pierd commented Oct 26, 2023

No description provided.

@pierd pierd self-assigned this Oct 26, 2023
@pierd pierd added the topic:networking Networking, including protocol and transmission medium label Oct 26, 2023
@pierd
Copy link
Contributor Author

pierd commented Nov 8, 2023

#1022 adds debug-local-datagram-latency feature for debugging the latency of sent unreliable messages, it relies on clocks being in sync so it works the best on localhost or via proxy (with both client and server running on the same machine).

@pierd pierd closed this as completed Nov 13, 2023
@pierd pierd reopened this Nov 14, 2023
@pierd
Copy link
Contributor Author

pierd commented Nov 14, 2023

Reopening as I'm going to explore adding true end to end latency (from user input to rendered frame).

@pierd
Copy link
Contributor Author

pierd commented Nov 20, 2023

@pierd
Copy link
Contributor Author

pierd commented Nov 27, 2023

Created a version in this branch: https://github.com/AmbientRun/Ambient/tree/kuba/timings

It currently spams the logs with all the measurements:

18:07:38  WARN ambient_timings: TIMING EVENT: Input 7.981000166s
18:07:38  WARN ambient_timings: TIMING EVENT: RenderingFinished 7.986576833s
18:07:38 ERROR ambient_timings: TIMINGS: Input <- 4.855708ms -> ScriptingStarted <- 10.20825ms -> ScriptingFinished <- 6.875µs -> ClientSystemsStarted <- 118.125µs -> ClientSystemsFinished <- 79.333µs -> DrawingWorld <- 379.709µs -> DrawingUI <- 144.083µs -> SubmittingGPUCommands <- 5.973875ms -> RenderingFinished
18:07:38 ERROR ambient_timings: INPUT TO RENDERED: 21.765958ms
18:07:38  WARN ambient_timings: TIMING EVENT: ScriptingStarted 7.986774625s
18:07:38  WARN ambient_timings: TIMING EVENT: ScriptingFinished 7.997007375s
18:07:38  WARN ambient_timings: TIMING EVENT: ClientSystemsStarted 7.997012041s
18:07:38  WARN ambient_timings: TIMING EVENT: ClientSystemsFinished 7.997129458s
18:07:38  WARN ambient_timings: TIMING EVENT: DrawingWorld 7.997216875s
18:07:38  WARN ambient_timings: TIMING EVENT: DrawingUI 7.997581333s
18:07:38  WARN ambient_timings: TIMING EVENT: SubmittingGPUCommands 7.997727625s
18:07:38  WARN ambient_timings: TIMING EVENT: RenderingFinished 8.002686125s
18:07:38 ERROR ambient_timings: TIMINGS: Input <- 5.774459ms -> ScriptingStarted <- 10.23275ms -> ScriptingFinished <- 4.666µs -> ClientSystemsStarted <- 117.417µs -> ClientSystemsFinished <- 87.417µs -> DrawingWorld <- 364.458µs -> DrawingUI <- 146.292µs -> SubmittingGPUCommands <- 4.9585ms -> RenderingFinished
18:07:38 ERROR ambient_timings: INPUT TO RENDERED: 21.685959ms
18:07:38  WARN ambient_timings: TIMING EVENT: ScriptingStarted 8.002881125s
18:07:38  WARN ambient_timings: TIMING EVENT: ScriptingFinished 8.013081083s
18:07:38  WARN ambient_timings: TIMING EVENT: ClientSystemsStarted 8.013087208s
18:07:38  WARN ambient_timings: TIMING EVENT: ClientSystemsFinished 8.0131955s
18:07:38  WARN ambient_timings: TIMING EVENT: DrawingWorld 8.013279083s
18:07:38  WARN ambient_timings: TIMING EVENT: DrawingUI 8.013685583s
18:07:38  WARN ambient_timings: TIMING EVENT: SubmittingGPUCommands 8.01383875s
18:07:38  WARN ambient_timings: TIMING EVENT: Input 8.014556708s
18:07:38  WARN ambient_timings: TIMING EVENT: RenderingFinished 8.019795416s
18:07:38 ERROR ambient_timings: TIMINGS: ScriptingStarted <- 10.199958ms -> ScriptingFinished <- 6.125µs -> ClientSystemsStarted <- 108.292µs -> ClientSystemsFinished <- 83.583µs -> DrawingWorld <- 406.5µs -> DrawingUI <- 153.167µs -> SubmittingGPUCommands <- 5.956666ms -> RenderingFinished
18:07:38  WARN ambient_timings: TIMING EVENT: ScriptingStarted 8.019980666s
18:07:38  WARN ambient_timings: TIMING EVENT: ScriptingFinished 8.030197583s
18:07:38  WARN ambient_timings: TIMING EVENT: ClientSystemsStarted 8.030206958s
18:07:38  WARN ambient_timings: TIMING EVENT: ClientSystemsFinished 8.030378958s

I need a decision on how to properly report it so that it's actually useful.

@pierd pierd closed this as completed Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:networking Networking, including protocol and transmission medium
Projects
None yet
Development

No branches or pull requests

1 participant