protobuf benchs: invoke protoc once with all protos (#623)
Before:
$ time ./compile-protos.sh
...
./compile-protos.sh 102.82s user 8.70s system 153% cpu 1:12.75 total
After:
$ time ./compile-protos.sh
...
./compile-protos.sh 6.26s user 0.57s system 141% cpu 4.820 total
diff --git a/protobuf/benchmarks/compile-protos.sh b/protobuf/benchmarks/compile-protos.sh
index b01cb47..8612662 100755
--- a/protobuf/benchmarks/compile-protos.sh
+++ b/protobuf/benchmarks/compile-protos.sh
@@ -30,8 +30,6 @@
mkdir -p ${OUTPUT_DIR}
-for proto in ${PROTOS[@]}
-do
- echo "PROTOC ${proto}"
- protoc -I"${SCRIPT_DIR}" --dart_out="${OUTPUT_DIR}" "${SCRIPT_DIR}/$proto"
-done
+set -x
+
+protoc -I"${SCRIPT_DIR}" --dart_out="${OUTPUT_DIR}" "${PROTOS[@]/#/$SCRIPT_DIR/}"