Browse Source

Update lithium. (#6277)

* Update lithium.

* update lithium.
Matthieu Garrigues 4 years ago
parent
commit
f8005e88f6

+ 22 - 0
frameworks/C++/lithium/benchmark_config.json

@@ -94,6 +94,28 @@
         "display_name": "Lithium-postgres-batch",
         "notes": "",
         "versus": "None"
+      },
+
+      "postgres-batch-beta": {
+        "db_url"         : "/db",
+        "query_url"      : "/queries?N=",
+        "fortune_url"    : "/fortunes",
+        "update_url"     : "/updates?N=",
+        "port": 8080,
+        "approach": "Realistic",
+        "classification": "Micro",
+        "database": "Postgres",
+        "framework": "Lithium",
+        "language": "C++",
+        "flavor": "None",
+        "orm": "Full",
+        "platform": "None",
+        "webserver": "None",
+        "os": "Linux",
+        "database_os": "Linux",
+        "display_name": "Lithium-postgres-batch-beta",
+        "notes": "",
+        "versus": "None"
       }
 
     }

+ 7 - 3
frameworks/C++/lithium/compile-batch.sh

@@ -2,7 +2,11 @@
 
 DB_FLAG=$1
 COMMIT=10b72ad8ce16528ff642f802e266a975964d06f9
-MONOTHREAD=$2
+COMMIT="$2"
+MONOTHREAD=$2	
+if [ "$COMMIT" = "" ]; then
+  COMMIT="10b72ad8ce16528ff642f802e266a975964d06f9"
+fi
 
 if [ $DB_FLAG = "TFB_MYSQL" ]; then
   echo "ERROR: Only Postgres has pipelining support for now."
@@ -17,9 +21,9 @@ fi
 
 wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_http_backend.hh
 
-clang++ -fprofile-instr-generate=./profile.prof -flto -DLITHIUM_SERVER_NAME=l -DPROFILE_MODE -DN_SQL_CONNECTIONS=1  -DMONOTHREAD=$MONOTHREAD -DNDEBUG -D$DB_FLAG -O3 -march=native -std=c++17 ./lithium_batch.cc $CXX_FLAGS -lpthread -lboost_context -lssl -lcrypto -o /lithium_tbf
+clang++ -fprofile-instr-generate=./profile.prof -flto -DLITHIUM_SERVER_NAME=l -DPROFILE_MODE -DN_SQL_CONNECTIONS=1 -DNDEBUG -D$DB_FLAG -O3 -march=native -std=c++17 ./lithium_batch.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 -DLITHIUM_SERVER_NAME=l -DNDEBUG -D$DB_FLAG -DN_SQL_CONNECTIONS=1  -DMONOTHREAD=$MONOTHREAD -O3 -march=native -std=c++17 ./lithium_batch.cc $CXX_FLAGS -lpthread -lboost_context -lssl -lcrypto -o /lithium_tbf
+clang++ -fprofile-instr-use=./profile.pgo -flto -DLITHIUM_SERVER_NAME=l -DNDEBUG -D$DB_FLAG -DN_SQL_CONNECTIONS=1 -O3 -march=native -std=c++17 ./lithium_batch.cc $CXX_FLAGS -lpthread -lboost_context -lssl -lcrypto -o /lithium_tbf
 
 /lithium_tbf tfb-database 8080

+ 1 - 1
frameworks/C++/lithium/compile.sh

@@ -4,7 +4,7 @@ DB_FLAG=$1
 COMMIT="$2"
 
 if [ "$COMMIT" = "" ]; then
-  COMMIT="e199537f15abce7cf25c0b4de0f14461a1f426ec"
+  COMMIT="a046b3345098157849d9e2ab49a475aaabf4a90f"
 fi
 
 if [ $DB_FLAG = "TFB_MYSQL" ]; then

+ 17 - 0
frameworks/C++/lithium/config.toml

@@ -1,5 +1,7 @@
 [framework]
 name = "lithium"
+authors = ["Matthieu Garrigues <[email protected]>"]
+github = "https://github.com/matt-42/lithium"
 
 [main]
 urls.plaintext = "/plaintext"
@@ -69,3 +71,18 @@ orm = "Full"
 platform = "None"
 webserver = "None"
 versus = "None"
+
+[postgres-batch-beta]
+urls.db = "/db"
+urls.query = "/queries?N="
+urls.update = "/updates?N="
+urls.fortune = "/fortunes"
+approach = "Realistic"
+classification = "Micro"
+database = "Postgres"
+database_os = "Linux"
+os = "Linux"
+orm = "Full"
+platform = "None"
+webserver = "None"
+versus = "None"

+ 13 - 0
frameworks/C++/lithium/lithium-postgres-batch-beta.dockerfile

@@ -0,0 +1,13 @@
+
+FROM buildpack-deps:focal
+
+RUN apt-get update -yqq
+RUN apt-get install -yqq clang libboost-context-dev libboost-dev wget
+RUN apt-get install -yqq bison flex
+
+COPY ./ ./
+
+RUN ./compile_libpq.sh batchmode
+ENV LD_LIBRARY_PATH=/usr/lib
+
+CMD ./compile-batch.sh TFB_PGSQL  16b3f43a2b292e5349b7b528fa9410b3239c15cb

+ 1 - 1
frameworks/C++/lithium/lithium-postgres-batch.dockerfile

@@ -11,4 +11,4 @@ ENV LD_LIBRARY_PATH=/usr/lib
 
 EXPOSE 8080
 
-CMD ./compile-batch.sh TFB_PGSQL 0
+CMD ./compile-batch.sh TFB_PGSQL 

+ 1 - 1
frameworks/C++/lithium/lithium-postgres-beta.dockerfile

@@ -11,4 +11,4 @@ ENV LD_LIBRARY_PATH=/usr/lib
 
 EXPOSE 8080
 
-CMD ./compile.sh TFB_PGSQL 667f439040821d981923492e59749b87005268e4
+CMD ./compile.sh TFB_PGSQL a046b3345098157849d9e2ab49a475aaabf4a90f