Skip to content

feat(@libp2p/perf): Continously measure Performance on a Single Connection #2064

@maschad

Description

@maschad

The motivation for the larger effort is documented in libp2p/test-plans#261.

Instead of downloading an arbitrary amount of MB multiple times, each on a new connection, establish a single connection and continuously measure the throughput for a fixed duration (60s by default). Perf stdout output would be refactored as such :

              interface Data {
                type: "intermediary" | "final";
                timeSeconds: number;
                uploadBytes: number;
                downloadBytes: number;
              }

where every second the client must print the current progress to stdout. See example below. Note the type: "intermediary".

               {
                 "type": "intermediary",
                 "timeSeconds": 1.004957645,
                 "uploadBytes": 73039872,
                 "downloadBytes": 0
               }

Before terminating, the client must print a final summary. See example below. Note the type: "final". Also note that the measurement includes the time to (1) establish the connection, (2) upload the bytes and (3) download the bytes.

               {
                 "type": "final",
                 "timeSeconds": 60.127230659,
                 "uploadBytes": 4382392320,
                 "downloadBytes": 0
               }

Metadata

Metadata

Assignees

Labels

P1High: Likely tackled by core team if no one steps upkind/enhancementA net-new feature or improvement to an existing featuretopic/perfPerformance

Type

No type

Projects

Status

🎉Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions