From f8cc5edb895725d2c085285908c6c2a62f18f7f0 Mon Sep 17 00:00:00 2001 From: phani Date: Mon, 6 Jan 2020 11:18:03 -0500 Subject: [PATCH] fibonacci serverless fn in awsm --- runtime/tests/fibonacci/main.c | 8 ++++---- runtime/tests/fibonacci/run_fib.sh | 2 +- runtime/tests/test_fibonacci.json | 13 +++++++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 runtime/tests/test_fibonacci.json diff --git a/runtime/tests/fibonacci/main.c b/runtime/tests/fibonacci/main.c index b271cb5..7c27956 100644 --- a/runtime/tests/fibonacci/main.c +++ b/runtime/tests/fibonacci/main.c @@ -13,11 +13,11 @@ main(int argc, char **argv) { unsigned long n = 0, r; scanf("%lu", &n); - unsigned long long st = get_time(), en; +// unsigned long long st = get_time(), en; r = fib(n); - en = get_time(); - fprintf(stderr, "%lu\n", r); +// en = get_time(); + printf("%lu\n", r); - print_time(st, en); +// print_time(st, en); return 0; } diff --git a/runtime/tests/fibonacci/run_fib.sh b/runtime/tests/fibonacci/run_fib.sh index 3e9439b..4463b8a 100755 --- a/runtime/tests/fibonacci/run_fib.sh +++ b/runtime/tests/fibonacci/run_fib.sh @@ -25,7 +25,7 @@ MAXNUM=$2 tmp1_cnt=${MAXNUM} -while [ ${tmp1_cnt} -gt 0 ]; do +while [ ${tmp1_cnt} -gt 28 ]; do testeach ./fibonacci_$1.out ${tmp1_cnt} tmp1_cnt=$((tmp1_cnt - 1)) done diff --git a/runtime/tests/test_fibonacci.json b/runtime/tests/test_fibonacci.json new file mode 100644 index 0000000..725feee --- /dev/null +++ b/runtime/tests/test_fibonacci.json @@ -0,0 +1,13 @@ +{ + "active" : "yes", + "name" : "fibonacci", + "path" : "fibonacci_wasm.so", + "port" : 10000, + "argsize" : 1, + "http-req-headers" : [ ], + "http-req-content-type" : "text/plain", + "http-req-size": 1024, + "http-resp-headers" : [ ], + "http-resp-size" : 1024, + "http-resp-content-type" : "text/plain" +}