hzq 1 рік тому
батько
коміт
c77229e059

+ 38 - 0
frameworks/C++/paozhu/README.md

@@ -0,0 +1,38 @@
+# paozhu Benchmarking Test
+
+This is the [Paozhu](https://github.com/hggq/paozhu) 
+
+### Test Type Implementation Source Code
+
+* [Benchmark code](controller/src/techempower.cpp)
+* [ORM config](conf/orm.conf) 
+* [Server config](conf/server.conf) 
+
+## Test URLs
+### JSON
+
+http://localhost:8888/json
+
+### PLAINTEXT
+
+http://localhost:8888/plaintext
+
+
+### Single Database Query
+
+http://localhost:8888/db
+
+### Fortune
+
+http://localhost:8888/fortunes
+
+### Multiple Database Queries
+
+http://localhost:8888/queries?queries=10
+
+### Database Updates
+
+http://localhost:8888/updates?queries=10
+
+### Cache
+http://localhost:8888/cached-queries?count=20

+ 31 - 0
frameworks/C++/paozhu/benchmark_config.json

@@ -0,0 +1,31 @@
+{
+  "framework": "paozhu",
+  "tests": [
+    {
+      "default": {
+        "json_url": "/json",
+        "plaintext_url": "/plaintext",
+        "db_url": "/db",
+        "fortune_url": "/fortunes",
+        "query_url": "/queries?queries=",
+        "update_url": "/updates?queries=",
+        "cached_query_url": "/cached-queries?count=",
+        "port": 8888,
+        "approach": "Realistic",
+        "classification": "Fullstack",
+        "database": "MySQL",
+        "framework": "paozhu",
+        "language": "C++",
+        "flavor": "None",
+        "orm": "Micro",
+        "platform": "None",
+        "webserver": "None",
+        "os": "Linux",
+        "database_os": "Linux",
+        "display_name": "paozhu",
+        "notes": "",
+        "versus": "None"
+      }
+    }
+  ]
+}

+ 22 - 0
frameworks/C++/paozhu/config.toml

@@ -0,0 +1,22 @@
+[framework]
+name = "paozhu"
+authors = ["Huang ziquan <[email protected]>"]
+github = "https://github.com/hggq/paozhu"
+
+[main]
+urls.plaintext = "/plaintext"
+urls.json = "/json"
+urls.db = "/db"
+urls.query = "/queries?queries="
+urls.update = "/updates?queries="
+urls.fortune = "/fortunes"
+urls.cached_query = "/cached-queries?count="
+approach = "Realistic"
+classification = "Fullstack"
+database = "MySQL"
+database_os = "Linux"
+os = "Linux"
+orm = "Micro"
+platform = "None"
+webserver = "None"
+versus = "None"

+ 27 - 0
frameworks/C++/paozhu/paozhu.dockerfile

@@ -0,0 +1,27 @@
+FROM ubuntu:22.04
+RUN apt-get update -yqq && apt-get install -yqq software-properties-common wget unzip cmake git
+RUN apt-get install -yqq gcc g++ openssl libssl-dev zlib1g-dev build-essential 
+
+RUN sudo apt install brotli 
+RUN sudo apt-get install mysql-server
+RUN sudo apt-get install mysql-common
+RUN sudo apt-get install mysql-client
+RUN sudo apt-get install libmysqlclient-dev
+
+RUN locale-gen en_US.UTF-8
+ENV LANG en_US.UTF-8
+ENV LANGUAGE en_US:en
+ENV LC_ALL en_US.UTF-8
+
+WORKDIR /
+
+RUN wget https://github.com/hggq/paozhu/releases/download/v1.5.6/benchmark.zip
+RUN unzip benchmark.zip
+RUN mv ./benchmark/* ./
+
+RUN cmake . -B build -DCMAKE_BUILD_TYPE=Release 
+RUN cmake --build build
+
+EXPOSE 8888
+WORKDIR ./
+CMD ./bin/paozhu