<commit_before>#!/bin/bash
#
# This shell script automates running the stomp-benchmark [1] against the
# Apache ActiveMQ project [2].
#
# [1]: http://github.com/chirino/stomp-benchmark
# [2]: http://activemq.apache.org
#

ACTIVEMQ_VERSION=5.5.1
ACTIVEMQ_DOWNLOAD="http://www.apache.org/dist/activemq/apache-activemq/${ACTIVEMQ_VERSION}/apache-activemq-${ACTIVEMQ_VERSION}-bin.tar.gz"
BENCHMARK_HOME=~/benchmark
. `dirname "$0"`/benchmark-setup.sh

#
# Install the apollo distro
#
ACTIVEMQ_HOME="${BENCHMARK_HOME}/apache-activemq-${ACTIVEMQ_VERSION}"
if [ ! -d "${ACTIVEMQ_HOME}" ]; then
  cd "${BENCHMARK_HOME}"
  wget "$ACTIVEMQ_DOWNLOAD"
  tar -zxvf apache-activemq-${ACTIVEMQ_VERSION}-bin.tar.gz
  rm -rf apache-activemq-${ACTIVEMQ_VERSION}-bin.tar.gz
fi


#
# Sanity Cleanup
rm -rf ${ACTIVEMQ_HOME}/data/*


#
# Start the broker
#
CONSOLE_LOG="${ACTIVEMQ_HOME}/console.log"
rm "${CONSOLE_LOG}" 2> /dev/null
"${ACTIVEMQ_HOME}/bin/activemq" console "xbean:file:${ACTIVEMQ_HOME}/conf/activemq-stomp.xml" 2>&1 > "${CONSOLE_LOG}" &
ACTIVEMQ_PID=$!
echo "Started ActiveMQ with PID: ${ACTIVEMQ_PID}"
sleep 5
cat ${CONSOLE_LOG}

#
# Run the benchmark
#
cd ${BENCHMARK_HOME}/stomp-benchmark
"${BENCHMARK_HOME}/bin/sbt" run reports/activemq-${ACTIVEMQ_VERSION}.json

# Kill the broker
kill -9 ${ACTIVEMQ_PID}<commit_msg>ActiveMQ needs more memory to complete the tests<commit_after>#!/bin/bash
#
# This shell script automates running the stomp-benchmark [1] against the
# Apache ActiveMQ project [2].
#
# [1]: http://github.com/chirino/stomp-benchmark
# [2]: http://activemq.apache.org
#

ACTIVEMQ_VERSION=5.5.1
ACTIVEMQ_DOWNLOAD="http://www.apache.org/dist/activemq/apache-activemq/${ACTIVEMQ_VERSION}/apache-activemq-${ACTIVEMQ_VERSION}-bin.tar.gz"
BENCHMARK_HOME=~/benchmark
. `dirname "$0"`/benchmark-setup.sh

#
# Install the apollo distro
#
ACTIVEMQ_HOME="${BENCHMARK_HOME}/apache-activemq-${ACTIVEMQ_VERSION}"
if [ ! -d "${ACTIVEMQ_HOME}" ]; then
  cd "${BENCHMARK_HOME}"
  wget "$ACTIVEMQ_DOWNLOAD"
  tar -zxvf apache-activemq-${ACTIVEMQ_VERSION}-bin.tar.gz
  rm -rf apache-activemq-${ACTIVEMQ_VERSION}-bin.tar.gz
fi


#
# Sanity Cleanup
rm -rf ${ACTIVEMQ_HOME}/data/*

#
# Configuration
export ACTIVEMQ_OPTS="-Xmx4G -Xms1G -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties"

#
# Start the broker
#
CONSOLE_LOG="${ACTIVEMQ_HOME}/console.log"
rm "${CONSOLE_LOG}" 2> /dev/null
"${ACTIVEMQ_HOME}/bin/activemq" console "xbean:file:${ACTIVEMQ_HOME}/conf/activemq-stomp.xml" 2>&1 > "${CONSOLE_LOG}" &
ACTIVEMQ_PID=$!
echo "Started ActiveMQ with PID: ${ACTIVEMQ_PID}"
sleep 5
cat ${CONSOLE_LOG}

#
# Run the benchmark
#
cd ${BENCHMARK_HOME}/stomp-benchmark
"${BENCHMARK_HOME}/bin/sbt" run reports/activemq-${ACTIVEMQ_VERSION}.json

# Kill the broker
kill -9 ${ACTIVEMQ_PID}
{'fraction_non_alphanumeric': 0.16424263923377083, 'fraction_numerical': 0.009932600212841433, 'mean_word_length': 5.588785046728972, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '218132', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1135, 'n_words': 186}