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

Load generator #864

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Load generator #864

wants to merge 24 commits into from

Conversation

akrishnaams
Copy link
Collaborator

This branch contains the profiler tool that profiles the benchmark functions and the load generator which generates load based on given trace

@akrishnaams akrishnaams requested a review from dhschall February 23, 2024 07:28
@dhschall dhschall self-assigned this Feb 23, 2024
@dhschall
Copy link
Contributor

dhschall commented Feb 24, 2024

Hey Arun, first of all thanks for all the huge amount of effort. I'm really impressed 👏!!
I made a couple of comments to the general structure.

The python files look really impressive. High-quality code and comments! I have to spend a bit more time on it. It's a lot of changes.

Most importantly you first need to rebase the branch to the latest main. Then, a lot of changed files will go away automatically. See my other comments.
Once you apply my comments, lots of changes will go away. Binaries, duplicate relay, and invoker. And if you then also make a separate PR for the new functions everything is much cleaner.

Also, we need to add a CI but I can help you with that :)

Copy link
Contributor

@dhschall dhschall left a comment

Choose a reason for hiding this comment

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

Please see my other comments

@@ -47,7 +47,7 @@ jobs:
go-version: '1.21'

- name: Install Protoc
uses: arduino/setup-protoc@v2
uses: arduino/setup-protoc@v3
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be in this PR but I guess it will go away once you rebase

@@ -59,7 +59,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Install Protoc
uses: arduino/setup-protoc@v2
uses: arduino/setup-protoc@v3
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@@ -29,7 +29,7 @@ spec:
template:
spec:
containers:
- image: docker.io/vhiveease/relay:latest
- image: docker.io/vhiveease/relay-latency:latest
Copy link
Contributor

Choose a reason for hiding this comment

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

As we said we should not use a separate image for that. Also, I'm not sure you wanted to modify those yaml files. Don't you need the relay-latency in the profiler/yamls

@@ -126,7 +126,11 @@ func runExperiment(endpoints []*endpoint.Endpoint, runDuration int, targetRPS fl
Start(TimeseriesDBAddr, endpoints, workflowIDs)

timeout := time.After(time.Duration(runDuration) * time.Second)
tick := time.Tick(time.Duration(1000/targetRPS) * time.Millisecond)
d := time.Duration(1000000/targetRPS) * time.Microsecond
Copy link
Contributor

Choose a reason for hiding this comment

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

This is also already merged. Rebasing will remove it

Copy link
Contributor

Choose a reason for hiding this comment

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

You should not commit this file. It will be generated each automatically.
I don't know why it is there in the first place

log.Debug("Recv from func: ", reply)
log.Debugf("Send to func: %s\n", pkt)

startTime := time.Now()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think what you should do is have a parameter to enable the latency measurement or an environment variable.
Then you can set this parameter/variable in the yaml file.
An environment variable you might even be able to set in from the python file but I'm not sure.

template:
spec:
containers:
- image: docker.io/vhiveease/relay:latest
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you wanted to have here the relay-latency. But as said I would use a parameter.
- --profile-fn-exec or similar


### Python packages
```bash
pip3 install numpy jq typing matplotlib argparse PyYAML scipy
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should add this in a requirements.txt file. This makes it easier with the CI.
See https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#requirements-file

Also, makes it easier manage dependencies automatically.

Try https://stackoverflow.com/a/33468993

@@ -0,0 +1,331 @@
// MIT License
//
// Copyright (c) 2020 Dmitrii Ustiugov and EASE lab
Copy link
Contributor

Choose a reason for hiding this comment

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

You can change the licence in all files to 2024 vhive-ecosystem.


### Python packages
```bash
pip3 install numpy jq typing matplotlib argparse PyYAML
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here. I would put this in a requirements.txt file

ArunAMS and others added 12 commits May 1, 2024 12:59
…. Modified parameters of profiler - removed unnecessary yaml parameter and added parameter to pass invoker binary location. Also modified profiler to work with the new invoker. Removed unnecessary files and binaries. Added profile.json and config.json for over 150+ functions
…or them sequentially. Modified the error calculation to logarithmic scale
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.

2 participants