From 6c9bc5dd4dafd0d8c5dff3b3c9ed3756f5c42c03 Mon Sep 17 00:00:00 2001
From: Krzysztof Mochocki <kmochocki@syncad.com>
Date: Fri, 5 Aug 2022 07:52:51 +0200
Subject: [PATCH] Add script to setup m2u

---
 benchmarks/setup_m2u.bash | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 benchmarks/setup_m2u.bash

diff --git a/benchmarks/setup_m2u.bash b/benchmarks/setup_m2u.bash
new file mode 100644
index 00000000..4daff8ae
--- /dev/null
+++ b/benchmarks/setup_m2u.bash
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+set -euo pipefail
+
+WORKDIR=m2u
+M2U_URL="https://github.com/tguzik/m2u.git"
+
+if [[ -f "$WORKDIR/activate" ]]; then
+    echo "using cached jmeter"
+    exit 0
+fi
+
+echo "creating work directory"
+mkdir -p "$WORKDIR"
+
+pushd "$WORKDIR"
+
+    echo "downloading m2u"
+    git clone "$M2U_URL" --single-branch -b master .
+
+    echo "configuring m2u"
+    mvn 2>&1 >/dev/null
+
+    echo "M2U='java -jar $PWD/target/m2u.jar'" > activate
+
+popd
-- 
GitLab