parent
562e5d8623
commit
8d1ba3d9b0
@ -1,78 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! command -v http > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y httpie
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y httpie
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v hey > /dev/null; then
|
||||
HEY_URL=https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64
|
||||
wget $HEY_URL -O hey
|
||||
chmod +x hey
|
||||
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
mv hey /usr/bin/hey
|
||||
else
|
||||
sudo mv hey /usr/bin/hey
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v loadtest > /dev/null; then
|
||||
if ! command -v npm > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y npm
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y npm
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
npm install -y -g loadtest
|
||||
else
|
||||
sudo npm install -y -g loadtest
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v gnuplot > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt-get update
|
||||
apt-get install -y gnuplot
|
||||
else
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gnuplot
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if ! command -v jq > /dev/null; then
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
apt update
|
||||
apt install -y jq
|
||||
else
|
||||
sudo apt update
|
||||
sudo apt install -y jq
|
||||
fi
|
||||
fi
|
||||
|
||||
# For SOD:
|
||||
if ! command -v imagemagick > /dev/null; then
|
||||
if [ "$(whoami)" == "root" ]; then
|
||||
apt-get install -y imagemagick
|
||||
else
|
||||
sudo apt-get install -y imagemagick
|
||||
fi
|
||||
fi
|
||||
|
||||
# For GOCR, too many to check one-by-one, so uncomment below to install:
|
||||
# if [[ "$(whoami)" == "root" ]]; then
|
||||
# apt-get install -y netpbm pango1.0-tools wamerican fonts-roboto fonts-cascadia-code fonts-dejavu
|
||||
# else
|
||||
# sudo apt-get install -y netpbm pango1.0-tools wamerican fonts-roboto fonts-cascadia-code fonts-dejavu
|
||||
# fi
|
@ -1 +0,0 @@
|
||||
out.png
|
Before Width: | Height: | Size: 606 KiB |
Before Width: | Height: | Size: 2.9 MiB |
@ -1,30 +0,0 @@
|
||||
SLEDGE_BINARY_DIR=../../runtime/bin
|
||||
HOSTNAME=localhost
|
||||
PORT=10000
|
||||
|
||||
default: run
|
||||
|
||||
clean:
|
||||
rm -rf res/*
|
||||
|
||||
run:
|
||||
SLEDGE_SPINLOOP_PAUSE_ENABLED=true SLEDGE_SANDBOX_PERF_LOG=perf.log LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} ${SLEDGE_BINARY_DIR}/sledgert spec.json
|
||||
|
||||
debug:
|
||||
SLEDGE_SPINLOOP_PAUSE_ENABLED=true SLEDGE_NWORKERS=1 LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} gdb ${SLEDGE_BINARY_DIR}/sledgert --eval-command="run spec.json"
|
||||
|
||||
valgrind:
|
||||
SLEDGE_DISABLE_PREEMPTION=true SLEDGE_NWORKERS=1 LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} valgrind --leak-check=full --max-stackframe=11150456 --run-libc-freeres=no --run-cxx-freeres=no ${SLEDGE_BINARY_DIR}/sledgert spec.json
|
||||
|
||||
.PHONY: client
|
||||
client:
|
||||
cat ./0_depth.png | http "${HOSTNAME}:${PORT}/depth_to_xyz" > ./out.png
|
||||
|
||||
client-cloudlab:
|
||||
cat ./0_depth.png | http "c220g2-011017.wisc.cloudlab.us:${PORT}/depth_to_xyz" > ./out.png
|
||||
|
||||
client-cmu:
|
||||
cat ./0_depth.png | http "arena0.andrew.cmu.edu:${PORT}/depth_to_xyz" > ./out.png
|
||||
|
||||
multi:
|
||||
hey -n 180 -c 180 -t 0 -o csv -m POST -D "./0_depth.png" "http://${HOSTNAME}:${PORT}/depth_to_xyz"
|
Before Width: | Height: | Size: 1.5 MiB |
@ -1,25 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "cmu",
|
||||
"port": 10000,
|
||||
"replenishment-period-us": 0,
|
||||
"max-budget-us": 0,
|
||||
"routes": [
|
||||
{
|
||||
"route": "/fib",
|
||||
"path": "fibonacci.wasm.so",
|
||||
"admissions-percentile": 50,
|
||||
"expected-execution-us": 6000,
|
||||
"relative-deadline-us": 20000,
|
||||
"http-resp-content-type": "text/plain"
|
||||
},
|
||||
{
|
||||
"route": "/depth_to_xyz",
|
||||
"path": "depth_to_xyz.wasm.so",
|
||||
"expected-execution-us": 5000,
|
||||
"relative-deadline-us": 360000,
|
||||
"http-resp-content-type": "img/png"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
@ -1,20 +0,0 @@
|
||||
import time
|
||||
import requests
|
||||
|
||||
url = 'http://arena0.andrew.cmu.edu:10000/depth_to_xyz'
|
||||
|
||||
payload = open('0_depth.png', 'rb')
|
||||
|
||||
img = None
|
||||
|
||||
response = requests.post(url, data=payload)
|
||||
img = response.content
|
||||
time.sleep(1)
|
||||
print("single request works!")
|
||||
|
||||
for i in range(100):
|
||||
payload = open('0_depth.png', 'rb')
|
||||
response = requests.post(url, data=payload)
|
||||
img = response.content
|
||||
time.sleep(1)
|
||||
print(f"multi request #{i} works!")
|
@ -1,31 +0,0 @@
|
||||
# import numpy as np
|
||||
import requests
|
||||
import threading
|
||||
import time
|
||||
|
||||
from flask import Flask, Response
|
||||
|
||||
url = 'http://arena0.andrew.cmu.edu:10000/depth_to_xyz'
|
||||
|
||||
# app = Flask(__name__)
|
||||
|
||||
img = None
|
||||
|
||||
def get_img():
|
||||
global img
|
||||
while True:
|
||||
print("start")
|
||||
try:
|
||||
payload = open('0_depth.png', 'rb')
|
||||
response = requests.post(url, data=payload)
|
||||
img = response.content
|
||||
print("got img")
|
||||
time.sleep(0.01)
|
||||
except:
|
||||
print("failed")
|
||||
time.sleep(5)
|
||||
|
||||
thread = threading.Thread(target=get_img)
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
thread.join()
|
@ -1,3 +0,0 @@
|
||||
SLEDGE_SCHEDULER=MTDBF
|
||||
SLEDGE_DISABLE_PREEMPTION=false
|
||||
SLEDGE_SANDBOX_PERF_LOG=perf.log
|
Loading…
Reference in new issue