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

Compute time to transfer n points. #444

Open
1 task
Tracked by #439
thomcom opened this issue Nov 17, 2022 · 0 comments
Open
1 task
Tracked by #439

Compute time to transfer n points. #444

thomcom opened this issue Nov 17, 2022 · 0 comments

Comments

@thomcom
Copy link
Contributor

thomcom commented Nov 17, 2022

The best way to stream points in the point budget is to know how many points we can transfer easily per frame. This is fairly trivial to compute:

  1. The client asks for 10 points from the server. Immediately before requesting points, set a timestamp. When the response is completed, set another timestamp. Save this value $t_1$ as the baseline.
  2. The client asks for 10000 points from the server. Do the same process, saving in $t_2$.
  3. The client asks for 1000000 points from the server. Save the result in $t_3$.

After a long conversation with ChatGPT we figured out a solution:

$t_i = n_i * m + o$ where m is the time to transfer 1 point and o is the overhead.

$m = (t_2 + t_3 - 2 * t_1) / (n_2 + n_3)$ and $o = t_1 - n_t * m$

#444 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant