Skip to content

Commit

Permalink
Merge branch 'load-gen-new' of https://github.com/vhive-serverless/vS…
Browse files Browse the repository at this point in the history
…warm into load-gen-new

Signed-off-by: Lakshman <Lakshman@localhost>
  • Loading branch information
Lakshman authored and Lakshman committed Sep 4, 2024
2 parents 3dc0583 + 8cb4cdb commit a8fd215
Show file tree
Hide file tree
Showing 217 changed files with 632 additions and 213 deletions.
50 changes: 35 additions & 15 deletions tools/load-generator/invoker/measure.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
invoker: client.go measure.go helloworld.pb.go helloworld_grpc.pb.go
go mod tidy
go build github.com/vhive-serverless/vSwarm/tools/invoker

helloworld.pb.go: proto/helloworld.proto
protoc \
--go_out=. \
--go_opt="paths=source_relative" \
proto/helloworld.proto

helloworld_grpc.pb.go: proto/helloworld.proto
protoc \
--go-grpc_out=. \
--go-grpc_opt="paths=source_relative" \
proto/helloworld.proto
package main

import (
// "context"
"sync"
"time"

// "github.com/golang/protobuf/ptypes/empty"
// log "github.com/sirupsen/logrus"
// "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
"google.golang.org/grpc"
// "google.golang.org/grpc/credentials/insecure"

"github.com/vhive-serverless/vSwarm/tools/benchmarking_eventing/proto"

// "github.com/vhive-serverless/vSwarm/tools/endpoint"
)

var (
tsdbConn *grpc.ClientConn
tsdbClient proto.TimeseriesClient
lock sync.Mutex
)

func Start() {
lock.Lock()
defer lock.Unlock()
return
}

func End() (durations []time.Duration) {
lock.Lock()
defer lock.Unlock()
return
}
3 changes: 3 additions & 0 deletions tools/load-generator/load_generator/deployer.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ def deploy_service(

# Execute the shell script and deploy the function
execute_shell = f"{shell_path} {shell_filename}"
log.info(f"Executing {shell_filename}")
try:
result = subprocess.run(
execute_shell,
Expand Down Expand Up @@ -285,6 +286,7 @@ def get_service_status(function_names: list) -> bool:
if status == "True":
service_status[function_name] = True
else:
log.info(f"Service {function_name} is not ready")
service_status[function_name] = False

for function_name in function_names:
Expand Down Expand Up @@ -391,6 +393,7 @@ def get_service_status(function_names: list) -> bool:
if e == 0: deployed_services_names.append(tf["proxy-function-name"])

if(len(deployed_services_names) % 50 == 49):
log.info("Waiting for 15 seconds, monitoring the service status")

# Monitor the service, until it is ready
# Monitoring happens every 15 seconds. If it shows failure even after that then it returns failure
Expand Down
3 changes: 2 additions & 1 deletion tools/load-generator/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ typing
matplotlib
argparse
PyYAML
scipy
scipy
tqdm
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-10-10.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-100-101.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-1000-1010.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-10000-10100.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-100000-101000.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-1000000-1010000.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-2000-2020.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-20000-20200.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-200000-202000.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-4500-4545.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-45000-45450.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-450000-454500.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-500-505.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-7000-7070.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-70000-70700.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-go/kn-aes-go-700000-707000.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ spec:
- image: docker.io/vhiveease/aes-go:latest
args:
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-10-10.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-100-101.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-1000-1010.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-10000-10100.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-100000-101000.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-1000000-1010000.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-2000-2020.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-20000-20200.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-200000-202000.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-4500-4545.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-45000-45450.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-450000-454500.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-500-505.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-7000-7070.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-70000-70700.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-nodejs/kn-aes-nodejs-700000-707000.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-10-10.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-100-101.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-1000-1010.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-10000-10100.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-100000-101000.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-1000000-1010000.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-2000-2020.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-20000-20200.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-200000-202000.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-4500-4545.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-45000-45450.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-450000-454500.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-500-505.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-7000-7070.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-70000-70700.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
2 changes: 2 additions & 0 deletions tools/load-generator/yamls/aes-python/kn-aes-python-700000-707000.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ spec:
args:
- --addr=0.0.0.0
- --port=50051
nodeSelector:
node-role: perfer
4 changes: 3 additions & 1 deletion tools/load-generator/yamls/auth/kn-auth-go.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ spec:
- --profile-function=true
- image: docker.io/vhiveease/auth-go:latest
args:
- --addr=0.0.0.0:50051
- --addr=0.0.0.0:50051
nodeSelector:
node-role: perfer
4 changes: 3 additions & 1 deletion tools/load-generator/yamls/auth/kn-auth-nodejs.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,6 @@ spec:
- image: docker.io/vhiveease/auth-nodejs:latest
args:
- --addr=0.0.0.0
- --port=50051
- --port=50051
nodeSelector:
node-role: perfer
4 changes: 3 additions & 1 deletion tools/load-generator/yamls/auth/kn-auth-python.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,6 @@ spec:
- image: docker.io/vhiveease/auth-python:latest
args:
- --addr=0.0.0.0
- --port=50051
- --port=50051
nodeSelector:
node-role: perfer
Loading

0 comments on commit a8fd215

Please sign in to comment.