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

Perf Service Interface #2000

Closed
justin0mcateer opened this issue Aug 29, 2023 · 5 comments
Closed

Perf Service Interface #2000

justin0mcateer opened this issue Aug 29, 2023 · 5 comments
Labels
kind/stale need/author-input Needs input from the original author

Comments

@justin0mcateer
Copy link

justin0mcateer commented Aug 29, 2023

  • Version:
    0.46.6

  • Platform:
    Linux master 6.4.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 24 Aug 2023 00:38:14 +0000 x86_64 GNU/Linux
    Google Chrome 116.0.5845.110

  • Subsystem:
    Perf

Severity:

Low

Description:

The Perf interface is unnecessarily difficult to use for a variety of reasons:

  1. BigInt input for Bytes. Why? Who is going to send more than 9 PetaBytes of data during a Perf test?
    I understand the reasoning for sending a fixed width value over the network; however, this conversion should be done by the library.
  2. User provided 'start' time. Why? The library starts sending the bytes after it is called, why does the client need to specify the start time?
  3. 'measurePerformance' returns time, instead of Bits per Second. Why would the client care about this? The user can time the function call themselves if so desired. Instead the user has to do the calculation. It should be noted that because timing captures both the sending and receiving, the correct math may not be immediately obvious.
  4. Asymmetric bandwidth on client sites. Typically, in home or SMB internet services, the bandwidth is highly (often 10:1) asymmetric between download and upload bandwidths. The transfer time should be captured separately for upload and download and independent measurements returned for upload/send and download/receive.
  5. Documentation/example is unhelpful. The documentation claims that 'this will not work in browsers.' I see no reason that this should be the case. The service merely sends bytes over an arbitrary user provided connection. The tests clearly won't work in the browser, as they are implemented using the TCP transport, but that doesn't apply to the service overall. The example usage doesn't provide any example of how to calculate the throughput, which (as I mentioned above) is likely non-obvious to many users.
  6. The 'measurePerformance' function accepts 'AbortOptions', but does not utilize it or implement any other form of timeout.
  7. Also, the package incorrectly lists a runtime dependency on 'tcp'.

Steps to reproduce the error:

Attempt to consume the 'measurePerformance' interface.

@justin0mcateer justin0mcateer added the need/triage Needs initial labeling and prioritization label Aug 29, 2023
@achingbrain
Copy link
Member

achingbrain commented Nov 7, 2023

All valid points, hopefully addressed in @libp2p/perf@2.x.x - please can you try this version out?

@achingbrain achingbrain added need/author-input Needs input from the original author and removed need/triage Needs initial labeling and prioritization labels Nov 7, 2023
Copy link
Contributor

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.

@justin0mcateer
Copy link
Author

We will update soon.

Copy link
Contributor

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.

Copy link
Contributor

This issue was closed because it is missing author input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/stale need/author-input Needs input from the original author
Projects
None yet
Development

No branches or pull requests

2 participants