Skip to content

Commit 61b1acb

Browse files
authored
[C++] Add new paozhu (#8705)
* [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * [C++] add new paozhu * update benchmark to v1.5.8 * update benchmark to v1.5.8 * Add benchmark files * Add benchmark files * use local file * use git clone * add conf * add conf * add conf * add conf * add conf * use local files * use local files * use local files * use local files * Remove files * Fix files
1 parent b2e4d55 commit 61b1acb

File tree

15 files changed

+1388
-0
lines changed

15 files changed

+1388
-0
lines changed

frameworks/C++/paozhu/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# paozhu Benchmarking Test
2+
3+
This is the [Paozhu](https://github.com/hggq/paozhu)
4+
5+
This Benchmarking Test code from https://github.com/hggq/paozhu/releases/tag/v1.5.8
6+
7+
### Test Type Implementation Source Code
8+
9+
* [Benchmark code](controller/src/techempower.cpp)
10+
* [ORM config](conf/orm.conf)
11+
* [Server config](conf/server.conf)
12+
13+
## Test URLs
14+
### JSON
15+
16+
http://localhost:8888/json
17+
18+
### PLAINTEXT
19+
20+
http://localhost:8888/plaintext
21+
22+
23+
### Single Database Query
24+
25+
http://localhost:8888/db
26+
27+
### Fortune
28+
29+
http://localhost:8888/fortunes
30+
31+
### Multiple Database Queries
32+
33+
http://localhost:8888/queries?queries=10
34+
35+
### Database Updates
36+
37+
http://localhost:8888/updates?queries=10
38+
39+
### Cache
40+
http://localhost:8888/cached-queries?count=20
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"framework": "paozhu",
3+
"tests": [
4+
{
5+
"default": {
6+
"json_url": "/json",
7+
"plaintext_url": "/plaintext",
8+
"db_url": "/db",
9+
"fortune_url": "/fortunes",
10+
"query_url": "/queries?queries=",
11+
"update_url": "/updates?queries=",
12+
"cached_query_url": "/cached-queries?count=",
13+
"port": 8888,
14+
"approach": "Realistic",
15+
"classification": "Fullstack",
16+
"database": "MySQL",
17+
"framework": "paozhu",
18+
"language": "C++",
19+
"flavor": "None",
20+
"orm": "Micro",
21+
"platform": "None",
22+
"webserver": "None",
23+
"os": "Linux",
24+
"database_os": "Linux",
25+
"display_name": "paozhu",
26+
"notes": "",
27+
"versus": "None"
28+
}
29+
}
30+
]
31+
}

frameworks/C++/paozhu/config.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[framework]
2+
name = "paozhu"
3+
authors = ["Huang ziquan <[email protected]>"]
4+
github = "https://github.com/hggq/paozhu"
5+
6+
[main]
7+
urls.plaintext = "/plaintext"
8+
urls.json = "/json"
9+
urls.db = "/db"
10+
urls.query = "/queries?queries="
11+
urls.update = "/updates?queries="
12+
urls.fortune = "/fortunes"
13+
urls.cached_query = "/cached-queries?count="
14+
approach = "Realistic"
15+
classification = "Fullstack"
16+
database = "MySQL"
17+
database_os = "Linux"
18+
os = "Linux"
19+
orm = "Micro"
20+
platform = "None"
21+
webserver = "None"
22+
versus = "None"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
FROM ubuntu:22.04
2+
RUN apt-get update -yqq && apt-get install -yqq apt-utils software-properties-common wget unzip cmake git
3+
RUN apt-get install -yqq gcc g++ openssl libssl-dev zlib1g-dev build-essential locales
4+
5+
RUN apt-get -y install brotli libbrotli-dev
6+
RUN apt-get -y install libreadline-dev
7+
RUN apt-get -y install mysql-client
8+
RUN apt-get -y install libmysqlclient-dev
9+
10+
RUN locale-gen en_US.UTF-8
11+
ENV LANG en_US.UTF-8
12+
ENV LANGUAGE en_US:en
13+
ENV LC_ALL en_US.UTF-8
14+
15+
COPY ./ ./
16+
WORKDIR /
17+
18+
# RUN wget https://github.com/hggq/paozhu/releases/download/v1.5.8/benchmark.zip
19+
RUN git clone https://github.com/hggq/paozhu
20+
# RUN unzip benchmark.zip
21+
RUN rm -Rf ./paozhu/controller
22+
23+
COPY ./paozhu_benchmark/controller ./paozhu/
24+
COPY ./paozhu_benchmark/common/autocontrolmethod.hpp ./paozhu/common/
25+
COPY ./paozhu_benchmark/common/reghttpmethod_pre.hpp ./paozhu/common/
26+
COPY ./paozhu_benchmark/common/reghttpmethod.hpp ./paozhu/common/
27+
28+
COPY ./paozhu_benchmark/conf/server.conf ./paozhu/conf/server.conf
29+
COPY ./paozhu_benchmark/conf/orm.conf ./paozhu/conf/orm.conf
30+
COPY ./paozhu_benchmark/CMakeLists.txt ./paozhu/CMakeLists.txt
31+
32+
WORKDIR /paozhu
33+
RUN unzip asio.zip
34+
35+
RUN cmake . -B build -DCMAKE_BUILD_TYPE=Release
36+
RUN cmake --build build
37+
38+
39+
EXPOSE 8888
40+
41+
CMD ./bin/paozhu

0 commit comments

Comments
 (0)