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

feat(perf): Added new CLI flags for iterations + updated docs #258

Merged
merged 6 commits into from
Aug 24, 2023

Conversation

maschad
Copy link
Member

@maschad maschad commented Aug 14, 2023

While integrating the js impl of perf I encountered some obstacles in running this infrastructure as well as adding and testing the perf implementation. These are some improvements I thought would help new users of perf

Related #222

perf/README.md Outdated Show resolved Hide resolved
Copy link
Member

@p-shahi p-shahi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive by review

perf/README.md Outdated Show resolved Hide resolved
perf/README.md Outdated Show resolved Hide resolved
perf/README.md Outdated Show resolved Hide resolved
perf/README.md Outdated Show resolved Hide resolved
perf/README.md Outdated Show resolved Hide resolved
perf/README.md Outdated Show resolved Hide resolved
Co-authored-by: Prithvi Shahi <shahi.prithvi@gmail.com>
@maschad maschad requested a review from p-shahi August 22, 2023 17:49
@p-shahi p-shahi merged commit eebc07b into libp2p:master Aug 24, 2023
2 checks passed
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this pull request was ready for merge. This is partially on me, due to my delayed review.

I don't think the --iterations flag is intuitive. See comment below. Also it is likely going away again with #261, as upload and download bandwidth tests will likely only run as a single iteration.

perf/README.md Show resolved Hide resolved
perf/README.md Outdated Show resolved Hide resolved
perf/README.md Outdated Show resolved Hide resolved
perf/runner/src/index.ts Show resolved Hide resolved
perf/README.md Show resolved Hide resolved
@@ -26,13 +33,28 @@ Benchmark results can be visualized with https://observablehq.com/@libp2p-worksp
5. `CLIENT_IP=$(terraform output -raw client_ip)`
6. `SERVER_IP=$(terraform output -raw server_ip)`

### Build and run implementations
**Notes**
- You may need to reset the infrastructure if you encounter any errors, you can do that by running `terraform destroy` and then `terraform apply`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a good general hint. In the most cases terraform should be able to reconciliate any changes without a previous terraform destroy. On a high level, I am hesitant to give general terraform advice here. I think that is much better placed in the official terraform documentation.

Comment on lines +82 to +83
- Logging MUST go to `stderr`.
- Measurement output is printed to **stdout** as JSON in the form of:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit pick. Either use monospace or bold.

│ with module.short_lived_server[0].aws_instance.perf,
│ on ../../modules/short_lived/main.tf line 15, in resource "aws_instance" "perf":
│ 15: resource "aws_instance" "perf" {
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add some context here along the lines of the below.

This implies that you haven't deployed the long-living infrastructure (e.g. launch template) on your AWS account. To do so along with each short-lived deployment, you can set the long_lived_enabled ...

@mxinden
Copy link
Member

mxinden commented Aug 24, 2023

How about replacing the --iterations flag with a --testing flag, which would reduce all benchmarks (ping, iperf, ...) to run a single time only. That would remove the counterintuitive 100 iterations on --iterations 10 and is future proof for #261.

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

Successfully merging this pull request may close these issues.

4 participants