From 6e54bd8a518e408073e6550e80dd2d335cebfc86 Mon Sep 17 00:00:00 2001 From: viferga Date: Fri, 20 Mar 2020 16:28:14 -0800 Subject: [PATCH] Add benchmarks for docker compose and tooling. --- docker-compose.yml | 2 +- tools/metacall-configure.sh | 51 ++++++++++++++++++++++++++++++++++- tools/metacall-environment.sh | 1 + 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 95470b95f..500ef4e6a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -60,7 +60,7 @@ services: args: METACALL_PATH: $METACALL_PATH METACALL_BUILD_TYPE: $METACALL_CORE_BUILD_TYPE - METACALL_BUILD_OPTIONS: root python ruby netcore2 nodejs file examples distributable tests scripts ports dynamic install pack # v8 coverage + METACALL_BUILD_OPTIONS: root python ruby netcore2 nodejs file examples distributable tests benchmarks scripts ports dynamic install pack # v8 coverage environment: DEBIAN_FRONTEND: noninteractive LTTNG_UST_REGISTER_TIMEOUT: 0 diff --git a/tools/metacall-configure.sh b/tools/metacall-configure.sh index 44f223445..cb71d05f3 100755 --- a/tools/metacall-configure.sh +++ b/tools/metacall-configure.sh @@ -32,6 +32,8 @@ BUILD_FILE=0 BUILD_SCRIPTS=0 BUILD_EXAMPLES=0 BUILD_DISTRIBUTABLE=0 +BUILD_TESTS=0 +BUILD_BENCHMARKS=0 BUILD_PORTS=0 BUILD_COVERAGE=0 @@ -95,6 +97,14 @@ sub_options() { echo "Build distributable libraries" BUILD_DISTRIBUTABLE=1 fi + if [ "$option" = 'tests' ]; then + echo "Build all tests" + BUILD_TESTS=1 + fi + if [ "$option" = 'benchmarks' ]; then + echo "Build all benchmarks" + BUILD_BENCHMARKS=1 + fi if [ "$option" = 'ports' ]; then echo "Build all ports" BUILD_PORTS=1 @@ -126,6 +136,10 @@ sub_configure() { if [ $BUILD_SCRIPTS = 1 ]; then BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_PY=On" fi + + if [ $BUILD_PORTS = 1 ]; then + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_PY=On" + fi fi # Ruby @@ -135,6 +149,10 @@ sub_configure() { if [ $BUILD_SCRIPTS = 1 ]; then BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_RB=On" fi + + if [ $BUILD_PORTS = 1 ]; then + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_RB=On" + fi fi # NetCore @@ -146,6 +164,10 @@ sub_configure() { if [ $BUILD_SCRIPTS = 1 ]; then BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_CS=On" fi + + if [ $BUILD_PORTS = 1 ]; then + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_CS=On" + fi fi # NetCore 2 @@ -157,6 +179,10 @@ sub_configure() { if [ $BUILD_SCRIPTS = 1 ]; then BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_CS=On" fi + + if [ $BUILD_PORTS = 1 ]; then + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_CS=On" + fi fi # V8 @@ -166,6 +192,10 @@ sub_configure() { if [ $BUILD_SCRIPTS = 1 ]; then BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_JS=On" fi + + if [ $BUILD_PORTS = 1 ]; then + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_JS=On" + fi fi # NodeJS @@ -175,6 +205,10 @@ sub_configure() { if [ $BUILD_SCRIPTS = 1 ]; then BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_NODE=On" fi + + if [ $BUILD_PORTS = 1 ]; then + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_NODE=On" + fi fi # File @@ -200,6 +234,20 @@ sub_configure() { BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_DIST_LIBS=Off" fi + # Tests + if [ $BUILD_TESTS = 1 ]; then + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_TESTS=On" + else + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_TESTS=Off" + fi + + # Benchmarks + if [ $BUILD_BENCHMARKS = 1 ]; then + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_BENCHMARKS=On" + else + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_BENCHMARKS=Off" + fi + # Ports if [ $BUILD_PORTS = 1 ]; then BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS=On" @@ -229,7 +277,7 @@ sub_help() { echo " python: build with python support" echo " ruby: build with ruby support" echo " netcore: build with netcore support" - echo " netcore: build with netcore 2 support" + echo " netcore2: build with netcore 2 support" echo " v8: build with v8 support" echo " nodejs: build with nodejs support" echo " file: build with file support" @@ -237,6 +285,7 @@ sub_help() { echo " examples: build all examples" echo " distributable: build distributable libraries" echo " tests: build and run all tests" + echo " benchmarks: build and run all benchmarks" echo " install: install all libraries" echo " static: build as static libraries" echo " dynamic: build as dynamic libraries" diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index 57c7086f2..c19db6b05 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -334,6 +334,7 @@ sub_wasm(){ # MetaCall sub_metacall(){ + # TODO: Update this or deprecate it echo "configure metacall" cd $ROOT_DIR git clone --recursive https://github.com/metacall/core.git