|
@@ -1,7 +1,8 @@
|
|
|
#! /bin/sh
|
|
|
|
|
|
DB_FLAG=$1
|
|
|
-COMMIT=ba3849b86e004798faf91d64a1a9550e379ac53a
|
|
|
+N_SQL_CONNECTIONS=$2
|
|
|
+COMMIT=2ea53ab949627baeaaad77e7662da74f9a9d0a31
|
|
|
|
|
|
if [ $DB_FLAG = "TFB_MYSQL" ]; then
|
|
|
CXX_FLAGS="-I /usr/include/mariadb -lmariadbclient "
|
|
@@ -14,9 +15,9 @@ fi
|
|
|
|
|
|
wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_http_backend.hh
|
|
|
|
|
|
-clang++ -fprofile-instr-generate=./profile.prof -flto -DPROFILE_MODE -DNDEBUG -D$DB_FLAG -O3 -march=native -std=c++17 ./lithium.cc $CXX_FLAGS -lpthread -lboost_context -lssl -lcrypto -o /lithium_tbf
|
|
|
+clang++ -fprofile-instr-generate=./profile.prof -flto -DN_SQL_CONNECTIONS=$N_SQL_CONNECTIONS -DPROFILE_MODE -DNDEBUG -D$DB_FLAG -O3 -march=native -std=c++17 ./lithium.cc $CXX_FLAGS -lpthread -lboost_context -lssl -lcrypto -o /lithium_tbf
|
|
|
/lithium_tbf tfb-database 8081
|
|
|
llvm-profdata-10 merge -output=./profile.pgo ./profile.prof
|
|
|
-clang++ -fprofile-instr-use=./profile.pgo -flto -DNDEBUG -D$DB_FLAG -O3 -march=native -std=c++17 ./lithium.cc $CXX_FLAGS -lpthread -lboost_context -lssl -lcrypto -o /lithium_tbf
|
|
|
+clang++ -fprofile-instr-use=./profile.pgo -flto -DN_SQL_CONNECTIONS=$N_SQL_CONNECTIONS -DNDEBUG -D$DB_FLAG -O3 -march=native -std=c++17 ./lithium.cc $CXX_FLAGS -lpthread -lboost_context -lssl -lcrypto -o /lithium_tbf
|
|
|
|
|
|
/lithium_tbf tfb-database 8080
|