Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.
Merged
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
23 changes: 23 additions & 0 deletions frameworks/C++/ffead-cpp/benchmark_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,29 @@
"display_name": "ffead-cpp",
"notes": "",
"versus": ""
},
"apache2": {
"setup_file": "setup-apache2",
"json_url": "/te-benchmark/json",
"plaintext_url": "/te-benchmark/plaintext",
"db_url": "/te-benchmark/db",
"query_url": "/te-benchmark/queries?queries=",
"fortune_url": "/te-benchmark/fortunes",
"update_url": "/te-benchmark/updates?queries=",
"port": 8080,
"approach": "Realistic",
"classification": "Fullstack",
"database": "MongoDB",
"framework": "ffead-cpp",
"language": "C++",
"orm": "Full",
"platform": "ffead-cpp-apache",
"webserver": "apache2",
"os": "Linux",
"database_os": "Linux",
"display_name": "ffead-cpp-apache",
"notes": "",
"versus": ""
}
}]
}
Expand Down
12 changes: 12 additions & 0 deletions frameworks/C++/ffead-cpp/setup-apache2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

fw_depends apache
fw_depends ffead-cpp-apache

export FFEAD_CPP_PATH=$TROOT/ffead-cpp-2.0
export LD_LIBRARY_PATH=$IROOT:$FFEAD_CPP_PATH/lib:$LD_LIBRARY_PATH
echo $FFEAD_CPP_PATH
echo $LD_LIBRARY_PATH
sudo rm -f $FFEAD_CPP_PATH/*.cntrl
sudo rm -f $FFEAD_CPP_PATH/tmp/*.sess
sudo /etc/init.d/apache2 restart > ffead.log 2>&1
56 changes: 56 additions & 0 deletions toolset/setup/linux/frameworks/ffead-cpp-apache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash

RETCODE=$(fw_exists ${IROOT}/ffead-cpp-apache.installed)
[ ! "$RETCODE" == 0 ] || { return 0; }

sudo apt-get install -y uuid-dev unixodbc unixodbc-dev

fw_get -o ffead-cpp-2.0.tar.gz https://github.com/sumeetchhetri/ffead-cpp/releases/download/v2.0-Draft-TLV-Fixed-TE_Benchmark/ffead-cpp-2.0-tlfixed-bin.tar.gz
fw_untar ffead-cpp-2.0.tar.gz

sudo rm -rf /var/www/ffead-cpp-2.0-bin
sudo cp -R ffead-cpp-2.0-bin/ /var/www
sudo mv /var/www/ffead-cpp-2.0-bin /var/www/ffead-cpp-2.0
rm -rf ffead-cpp-2.0/

wget https://github.com/mongodb/mongo-c-driver/releases/download/1.1.10/mongo-c-driver-1.1.10.tar.gz
tar -xzf mongo-c-driver-1.1.10.tar.gz
cd mongo-c-driver-1.1.10/
./configure --prefix=${IROOT} --libdir=${IROOT}
make && sudo make install

FFEADROOT=/var/www/ffead-cpp-2.0
ETROOT=${FFEADROOT//\//\\/}
EIROOT=${IROOT//\//\\/}

sudo sed -i 's/.*Listen 80.*/#Listen 80/' /etc/apache2/ports.conf
sudo sed -i '/^export FFEAD_CPP_PATH=/{h;s/=.*/='"${ETROOT}"'/};${x;/^$/{s//export FFEAD_CPP_PATH='"${ETROOT}"'/;H};x}' /etc/apache2/envvars
sudo sed -i '/^export LD_LIBRARY_PATH=/{h;s/=.*/='"${EIROOT}"':$FFEAD_CPP_PATH\/lib:$LD_LIBRARY_PATH/};${x;/^$/{s//export LD_LIBRARY_PATH='"${EIROOT}"':$FFEAD_CPP_PATH\/lib:$LD_LIBRARY_PATH/;H};x}' /etc/apache2/envvars

sudo bash -c 'rm -f /etc/apache2/sites-enabled/ffead-site.conf'

sudo bash -c 'cat > /etc/apache2/sites-enabled/ffead-site.conf <<EOL
LoadModule ffead_cpp_module '"${FFEADROOT}"'/mod_ffeadcpplib.so
Listen 8080
FFEAD_CPP_PATH '"${FFEADROOT}"'
<VirtualHost *:8080>
DocumentRoot '"${FFEADROOT}"'/web
SetHandler ffead_cpp_module
<Directory '"${FFEADROOT}"'>
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory '"${FFEADROOT}"'/web/>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
EOL'

sudo adduser testrunner www-data
sudo chown -R www-data:www-data ${FFEADROOT}
sudo chmod -R g+rw ${FFEADROOT}

touch ${IROOT}/ffead-cpp-apache.installed
9 changes: 7 additions & 2 deletions toolset/setup/linux/frameworks/ffead-cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ RETCODE=$(fw_exists ${IROOT}/ffead-cpp.installed)

sudo apt-get install -y uuid-dev unixodbc unixodbc-dev

fw_get -o ffead-cpp-2.0.tar.gz https://github.com/sumeetchhetri/ffead-cpp/files/62038/ffead-cpp-2.0-bin.tar.gz
fw_get -o ffead-cpp-2.0.tar.gz https://github.com/sumeetchhetri/ffead-cpp/releases/download/v2.0-Draft-TLV-Fixed-TE_Benchmark/ffead-cpp-2.0-tlfixed-bin.tar.gz
fw_untar ffead-cpp-2.0.tar.gz

cp -R ffead-cpp-2.0-bin/ ${TROOT}/ffead-cpp-2.0
rm -rf ${TROOT}/ffead-cpp-2.0-bin
cp -R ffead-cpp-2.0-bin/ ${TROOT}
mv ${TROOT}/ffead-cpp-2.0-bin ${TROOT}/ffead-cpp-2.0
rm -rf ffead-cpp-2.0/

sudo chown -R testrunner:testrunner ${TROOT}/ffead-cpp-2.0
sudo chmod -R g+rw ${TROOT}/ffead-cpp-2.0

wget https://github.com/mongodb/mongo-c-driver/releases/download/1.1.10/mongo-c-driver-1.1.10.tar.gz
tar -xzf mongo-c-driver-1.1.10.tar.gz
cd mongo-c-driver-1.1.10/
Expand Down