Skip to content

Commit 6e54bd8

Browse files
committed
Add benchmarks for docker compose and tooling.
1 parent 2094cbe commit 6e54bd8

File tree

3 files changed

+52
-2
lines changed

3 files changed

+52
-2
lines changed

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ services:
6060
args:
6161
METACALL_PATH: $METACALL_PATH
6262
METACALL_BUILD_TYPE: $METACALL_CORE_BUILD_TYPE
63-
METACALL_BUILD_OPTIONS: root python ruby netcore2 nodejs file examples distributable tests scripts ports dynamic install pack # v8 coverage
63+
METACALL_BUILD_OPTIONS: root python ruby netcore2 nodejs file examples distributable tests benchmarks scripts ports dynamic install pack # v8 coverage
6464
environment:
6565
DEBIAN_FRONTEND: noninteractive
6666
LTTNG_UST_REGISTER_TIMEOUT: 0

tools/metacall-configure.sh

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ BUILD_FILE=0
3232
BUILD_SCRIPTS=0
3333
BUILD_EXAMPLES=0
3434
BUILD_DISTRIBUTABLE=0
35+
BUILD_TESTS=0
36+
BUILD_BENCHMARKS=0
3537
BUILD_PORTS=0
3638
BUILD_COVERAGE=0
3739

@@ -95,6 +97,14 @@ sub_options() {
9597
echo "Build distributable libraries"
9698
BUILD_DISTRIBUTABLE=1
9799
fi
100+
if [ "$option" = 'tests' ]; then
101+
echo "Build all tests"
102+
BUILD_TESTS=1
103+
fi
104+
if [ "$option" = 'benchmarks' ]; then
105+
echo "Build all benchmarks"
106+
BUILD_BENCHMARKS=1
107+
fi
98108
if [ "$option" = 'ports' ]; then
99109
echo "Build all ports"
100110
BUILD_PORTS=1
@@ -126,6 +136,10 @@ sub_configure() {
126136
if [ $BUILD_SCRIPTS = 1 ]; then
127137
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_PY=On"
128138
fi
139+
140+
if [ $BUILD_PORTS = 1 ]; then
141+
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_PY=On"
142+
fi
129143
fi
130144

131145
# Ruby
@@ -135,6 +149,10 @@ sub_configure() {
135149
if [ $BUILD_SCRIPTS = 1 ]; then
136150
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_RB=On"
137151
fi
152+
153+
if [ $BUILD_PORTS = 1 ]; then
154+
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_RB=On"
155+
fi
138156
fi
139157

140158
# NetCore
@@ -146,6 +164,10 @@ sub_configure() {
146164
if [ $BUILD_SCRIPTS = 1 ]; then
147165
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_CS=On"
148166
fi
167+
168+
if [ $BUILD_PORTS = 1 ]; then
169+
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_CS=On"
170+
fi
149171
fi
150172

151173
# NetCore 2
@@ -157,6 +179,10 @@ sub_configure() {
157179
if [ $BUILD_SCRIPTS = 1 ]; then
158180
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_CS=On"
159181
fi
182+
183+
if [ $BUILD_PORTS = 1 ]; then
184+
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_CS=On"
185+
fi
160186
fi
161187

162188
# V8
@@ -166,6 +192,10 @@ sub_configure() {
166192
if [ $BUILD_SCRIPTS = 1 ]; then
167193
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_JS=On"
168194
fi
195+
196+
if [ $BUILD_PORTS = 1 ]; then
197+
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_JS=On"
198+
fi
169199
fi
170200

171201
# NodeJS
@@ -175,6 +205,10 @@ sub_configure() {
175205
if [ $BUILD_SCRIPTS = 1 ]; then
176206
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_NODE=On"
177207
fi
208+
209+
if [ $BUILD_PORTS = 1 ]; then
210+
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_NODE=On"
211+
fi
178212
fi
179213

180214
# File
@@ -200,6 +234,20 @@ sub_configure() {
200234
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_DIST_LIBS=Off"
201235
fi
202236

237+
# Tests
238+
if [ $BUILD_TESTS = 1 ]; then
239+
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_TESTS=On"
240+
else
241+
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_TESTS=Off"
242+
fi
243+
244+
# Benchmarks
245+
if [ $BUILD_BENCHMARKS = 1 ]; then
246+
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_BENCHMARKS=On"
247+
else
248+
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_BENCHMARKS=Off"
249+
fi
250+
203251
# Ports
204252
if [ $BUILD_PORTS = 1 ]; then
205253
BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS=On"
@@ -229,14 +277,15 @@ sub_help() {
229277
echo " python: build with python support"
230278
echo " ruby: build with ruby support"
231279
echo " netcore: build with netcore support"
232-
echo " netcore: build with netcore 2 support"
280+
echo " netcore2: build with netcore 2 support"
233281
echo " v8: build with v8 support"
234282
echo " nodejs: build with nodejs support"
235283
echo " file: build with file support"
236284
echo " scripts: build all scripts"
237285
echo " examples: build all examples"
238286
echo " distributable: build distributable libraries"
239287
echo " tests: build and run all tests"
288+
echo " benchmarks: build and run all benchmarks"
240289
echo " install: install all libraries"
241290
echo " static: build as static libraries"
242291
echo " dynamic: build as dynamic libraries"

tools/metacall-environment.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ sub_wasm(){
334334

335335
# MetaCall
336336
sub_metacall(){
337+
# TODO: Update this or deprecate it
337338
echo "configure metacall"
338339
cd $ROOT_DIR
339340
git clone --recursive https://github.com/metacall/core.git

0 commit comments

Comments
 (0)