diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 8824256..eb91315 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -78,6 +78,15 @@ jobs: - name: Test Vine Serverless Mode run: ./test-vine-serverless.sh + vine-throughput-capi-job: + runs-on: ubuntu-20.04 + timeout-minutes: 20 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Test Vine Throughput Test C API + run: ./test-vine-task-throughput-capi.sh + parrot-cvmfs-job: runs-on: ubuntu-20.04 timeout-minutes: 10 diff --git a/test-vine-task-throughput-capi.sh b/test-vine-task-throughput-capi.sh new file mode 100755 index 0000000..ad5d868 --- /dev/null +++ b/test-vine-task-throughput-capi.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# Build the sources from github +. ./install-github.sh + +# Compile C API test using environment +gcc test-vine-task-throughput.c -o test-vine-task-throughput -I $PREFIX/include/cctools/ -L $PREFIX/lib -ltaskvine -ldttools -lm -lcrypto -lssl -lz + +./test-vine-task-throughput & + +vine_worker localhost 9123 --single-shot diff --git a/test-vine-task-throughput.c b/test-vine-task-throughput.c new file mode 100644 index 0000000..ee2c8cd --- /dev/null +++ b/test-vine-task-throughput.c @@ -0,0 +1,50 @@ +#include "taskvine.h" + +#include +#include +#include +#include +#include +#include + +int main(int argc, char *argv[]) +{ + struct vine_manager *m; + struct vine_task *t; + int i; + int tasksC = 5000; + + //Create the manager. All tasks and files will be declared with respect to + m = vine_create(9123); + if(!m) { + printf("couldn't create manager: %s\n", strerror(errno)); + return 1; + } + printf("TaskVine listening on %d\n", vine_port(m)); + printf("Declaring tasks..."); + + for(i=0;i