Skip to content

Changes to run loadtest on D6 w/ Tag1 VM #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Assumptions
These scripts assume:
1. A Drupal installation -- webroot and database.
2. [Apache Jmeter](http://jmeter.apache.org/) installed to /usr/local/jmeter/
3. This repo was checked out at /root and renamed to jmeter

Running Tests
-------------
Expand Down
6 changes: 3 additions & 3 deletions loadtest.jmx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</elementProp>
<elementProp name="drupal.path.logout" elementType="Argument">
<stringProp name="Argument.name">drupal.path.logout</stringProp>
<stringProp name="Argument.value">user/logout</stringProp>
<stringProp name="Argument.value">logout</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="drupal.password" elementType="Argument">
Expand Down Expand Up @@ -1322,7 +1322,7 @@
</hashTree>
<GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="logout" enabled="true"/>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="user/logout" enabled="true">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="logout" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
Expand Down Expand Up @@ -1619,7 +1619,7 @@
</hashTree>
<GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="logout" enabled="true"/>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="user/logout" enabled="true">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="logout" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
Expand Down
8 changes: 3 additions & 5 deletions scripts/memcache.settings.inc
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

// Memcached settings.
$conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';
$conf['cache_inc'] ='sites/all/modules/memcache/memcache.inc';
$conf['lock_inc'] = 'sites/all/modules/memcache/memcache-lock.inc';
$conf['memcache_stampede_protection'] = TRUE;
$conf['cache_default_class'] = 'MemCacheDrupal';

// The 'cache_form' bin must be assigned no non-volatile storage.
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
// The 'cache_form' bin must be assigned to non-volatile storage.
$conf['memcache_bins']['cache_form'] = 'database';
6 changes: 3 additions & 3 deletions scripts/preptest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# Prep a base Drupal install for memcache testing.
# This assumes that $WEBDIR contains a working Drupal install.

WEBDIR=/var/www/html
WEBDIR=/var/www/vagrant-multi1.tag1consulting.com
MEMCACHE_SETTINGS_FILE=memcache.settings.inc
MEMCACHE_VERSION=7.x-1.2
DATABASE_NAME=drupal
MEMCACHE_VERSION=6.x-1.11-rc1
DATABASE_NAME=vagrant

USER_COUNT=5000
CONTENT_COUNT=10000
Expand Down
8 changes: 4 additions & 4 deletions scripts/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ fi

DATE=`date +%d-%m-%y--%H:%M:%S-$TAG`
BASEDIR="/root/jmeter"
WEBROOT="/var/www/html"
WEBROOT="/var/www/vagrant-multi1.tag1consulting.com"
OUTPUT="$BASEDIR/output"
DEST="$WEBROOT/$DATE"
SECONDS=300
IPADDR=$(/sbin/ifconfig eth0 | /bin/grep 'inet addr' | /bin/cut -d':' -f 2 | /bin/cut -d' ' -f 1)
# This is output by preptest.sh...
SQL_DUMP=/root/drupal_with_test_content.sql.gz
DB_NAME=drupal
DB_NAME=vagrant

# Load the database into MySQL so each test starts with the same base data.
echo "Reloading DB, this will likely take a few minutes..."
mysql -e "DROP DATABASE $DB_NAME"
mysql -e "CREATE DATABASE $DB_NAME"
gunzip -c $SQL_DUMP | mysql $DB_NAME

/sbin/service mysqld restart
/sbin/service mariadb restart
/sbin/service httpd restart
/sbin/service memcached restart

Expand All @@ -37,7 +37,7 @@ rm -f "$WEBROOT/latest"
ln -s $DEST "$WEBROOT/latest"
# Add .htaccess to override Drupal's default of disabling indexes.
echo "Options +Indexes" > $WEBROOT/latest/.htaccess
echo 'stats' | nc localhost 11211 > "$WEBROOT/latest/memcached.stats.txt"
echo 'stats' | nc 127.0.0.1 11211 > "$WEBROOT/latest/memcached.stats.txt"

SUMMARY="$WEBROOT/latest/summary.tsv"

Expand Down