pull/376/head
adroitx 2 years ago
parent 1207d4b936
commit f106bbf768

1
.gitignore vendored

@ -66,3 +66,4 @@ Dockerfile
# Others
runtime/thirdparty/dist/
.idea/

@ -20,6 +20,7 @@ dist:
.PHONY: all
all: \
cifar10.install \
echo.install \
empty.install \
fibonacci.install \
gocr.install \
@ -80,6 +81,8 @@ dist/%.wasm.so: dist/%.bc
cifar10.install: ../runtime/bin/cifar10.wasm.so
# Echo?
.PHONY: echo.install
echo.install: ../runtime/bin/echo.wasm.so
.PHONY: empty.install
empty.install: ../runtime/bin/empty.wasm.so

@ -107,6 +107,13 @@ PHONY: fibonacci__bimodal
fibonacci__bimodal: ./runtime/bin/fibonacci.wasm.so
cd ./tests/fibonacci/bimodal/ && ./run.sh
./runtime/bin/echo.wasm.so:
make echo.install -C ./applications
#PHONY: echo
#echo: ./runtime/bin/echo.wasm.so
# cd ./tests/echo && ./run.sh
./runtime/bin/empty.wasm.so:
make empty.install -C ./applications

@ -0,0 +1,41 @@
RUNTIME_DIR=../../../runtime/
SLEDGE_BINARY_DIR=${RUNTIME_DIR}/bin
SLEDGE_TESTS_DIR=${RUNTIME_DIR}/tests
HOSTNAME=localhost
DURATION_SEC=15
all: run
clean:
make -C ${RUNTIME_DIR} clean
make -C ${SLEDGE_TESTS_DIR} clean
rm -f ${SLEDGE_BINARY_DIR}/echo.wasm.so
${SLEDGE_BINARY_DIR}/sledgert:
make -C ${RUNTIME_DIR} runtime
.PHONY: sledgert
sledgert: ${SLEDGE_BINARY_DIR}/sledgert
${SLEDGE_BINARY_DIR}/echo.wasm.so:
make -C ../../../applications echo.install
.PHONY: echo
echo: ${SLEDGE_BINARY_DIR}/echo.wasm.so
run: sledgert echo
LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} ${SLEDGE_BINARY_DIR}/sledgert spec.json
debug: sledgert echo
SLEDGE_DISABLE_PREEMPTION=true SLEDGE_NWORKERS=1 \
LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} gdb ${SLEDGE_BINARY_DIR}/sledgert \
--eval-command="handle SIGUSR1 noprint nostop" \
--eval-command="handle SIGPIPE noprint nostop" \
--eval-command="set pagination off" \
--eval-command="run spec.json"
client-echo-once:
http :10050/echo?John
client-preempt:
(http :10050/echo?John &); http :10050/echo?Doe

@ -0,0 +1,18 @@
[
{
"name": "gwu",
"port": 10050,
"replenishment-period-us": 0,
"max-budget-us": 0,
"routes": [
{
"route": "/echo",
"path": "fibonacci.wasm.so",
"admissions-percentile": 70,
"expected-execution-us": 6000,
"relative-deadline-us": 20000,
"http-resp-content-type": "text/plain"
}
]
}
]
Loading…
Cancel
Save