Browse Source

Lithium update. (#6100)

* Lithium update.

* Lithium update.
Matthieu Garrigues 4 years ago
parent
commit
5e98353c75

+ 1 - 1
frameworks/C++/lithium/benchmark_config.json

@@ -9,7 +9,7 @@
         "fortune_url"    : "/fortunes",
         "fortune_url"    : "/fortunes",
         "update_url"     : "/updates?N=",
         "update_url"     : "/updates?N=",
         "plaintext_url"  : "/plaintext",
         "plaintext_url"  : "/plaintext",
-        "cached_query_url"    : "/cached-worlds?N=",
+        "cached_query_url": "/cached-worlds?N=",
         "port": 8080,
         "port": 8080,
         "approach": "Realistic",
         "approach": "Realistic",
         "classification": "Micro",
         "classification": "Micro",

+ 2 - 2
frameworks/C++/lithium/compile_and_start_clang.sh

@@ -1,7 +1,7 @@
 #! /bin/sh
 #! /bin/sh
 
 
 DB_FLAG=$1
 DB_FLAG=$1
-COMMIT=58334f62653a330863cfff633b50f3cfc567e527
+COMMIT=17737fb9473e0111d5ab235a13b6a143b5ca1673
 
 
 if [ $DB_FLAG = "TFB_MYSQL" ]; then
 if [ $DB_FLAG = "TFB_MYSQL" ]; then
   CXX_FLAGS="-I /usr/include/mariadb  -lmariadbclient "
   CXX_FLAGS="-I /usr/include/mariadb  -lmariadbclient "
@@ -12,7 +12,7 @@ elif [ $DB_FLAG = "TFB_PGSQL" ]; then
 fi
 fi
 
 
 
 
-wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_http_backend.hh
+wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_http_server.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 -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
 /lithium_tbf tfb-database 8081

+ 2 - 2
frameworks/C++/lithium/compile_and_start_gcc.sh

@@ -1,7 +1,7 @@
 #! /bin/sh
 #! /bin/sh
 
 
 DB_FLAG=$1
 DB_FLAG=$1
-COMMIT=58334f62653a330863cfff633b50f3cfc567e527
+COMMIT=17737fb9473e0111d5ab235a13b6a143b5ca1673
 
 
 if [ $DB_FLAG = "TFB_MYSQL" ]; then
 if [ $DB_FLAG = "TFB_MYSQL" ]; then
   CXX_FLAGS="-I /usr/include/mariadb  -lmariadbclient "
   CXX_FLAGS="-I /usr/include/mariadb  -lmariadbclient "
@@ -12,7 +12,7 @@ elif [ $DB_FLAG = "TFB_PGSQL" ]; then
 fi
 fi
 
 
 
 
-wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_http_backend.hh
+wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_http_server.hh
 
 
 g++ -flto -DNDEBUG -D$DB_FLAG -O3 -march=native -std=c++17 ./lithium.cc $CXX_FLAGS -lpthread -lboost_context -lssl -lcrypto -o /lithium_tbf
 g++ -flto -DNDEBUG -D$DB_FLAG -O3 -march=native -std=c++17 ./lithium.cc $CXX_FLAGS -lpthread -lboost_context -lssl -lcrypto -o /lithium_tbf
 
 

+ 1 - 1
frameworks/C++/lithium/compile_clang-batch.sh

@@ -1,7 +1,7 @@
 #! /bin/sh
 #! /bin/sh
 
 
 DB_FLAG=$1
 DB_FLAG=$1
-COMMIT=bc145d604f14a11082cc5e00ba854d0786d69e3d
+COMMIT=fac5aec6f7b3c8021186a15b0a5ee27081807cd2
 MONOTHREAD=$2
 MONOTHREAD=$2
 
 
 if [ $DB_FLAG = "TFB_MYSQL" ]; then
 if [ $DB_FLAG = "TFB_MYSQL" ]; then

+ 7 - 5
frameworks/C++/lithium/compile_libpq.sh

@@ -1,16 +1,18 @@
 #! /bin/sh
 #! /bin/sh
 
 
 # Compile libpq
 # Compile libpq
-wget -nv https://github.com/postgres/postgres/archive/bab150045bd9766869f471ede88734ea0989261c.zip
+commit=b787d4ce6d910080065025bcd5f968544997271f
 
 
-unzip -q bab150045bd9766869f471ede88734ea0989261c.zip
-cd postgres-bab150045bd9766869f471ede88734ea0989261c
+wget -nv https://github.com/postgres/postgres/archive/$commit.zip
+unzip -q $commit.zip
+cd postgres-$commit
 if [ "$1" = "batchmode" ]; then
 if [ "$1" = "batchmode" ]; then
-  wget -nv https://www.postgresql.org/message-id/attachment/112272/v18-0001-libpq-batch-support.patch
-  git apply ./v18-0001-libpq-batch-support.patch
+  wget -nv https://www.postgresql.org/message-id/attachment/115223/v22-0001-libpq-batch.patch
+  git apply ./v22-0001-libpq-batch.patch
 fi
 fi
 
 
 ./configure --prefix=/usr CFLAGS='-O3 -march=native -flto'
 ./configure --prefix=/usr CFLAGS='-O3 -march=native -flto'
 cd src/interfaces/libpq
 cd src/interfaces/libpq
 make all install -j4
 make all install -j4
+cp ../../../src/include/postgres_ext.h ../../../src/include/pg_config_ext.h /usr/include
 cd /
 cd /

+ 1 - 1
frameworks/C++/lithium/lithium.cc

@@ -1,4 +1,4 @@
-#include "lithium_http_backend.hh"
+#include "lithium_http_server.hh"
 
 
 #if TFB_MYSQL
 #if TFB_MYSQL
   #include "lithium_mysql.hh"
   #include "lithium_mysql.hh"