Skip to content

Commit 3334909

Browse files
authored
Merge branch 'TechEmpower:master' into master
2 parents 18a1b2e + 21caa53 commit 3334909

File tree

1,392 files changed

+57791
-31905
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,392 files changed

+57791
-31905
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
# run-ci.py runs the diffing to see if github actions needs to test this framework. Ideally/eventually,
156156
# we'd like to try and do the diffing before github_actions_clean & setup.
157157
# This will run the tests exactly as you would in your own vm:
158-
docker network create tfb > /dev/null 2>&1 && docker run --network=tfb -e USER_ID=$(id -u) -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=`pwd`,target=/FrameworkBenchmarks techempower/tfb --mode verify --test-dir $RUN_TESTS --results-environment Github-Actions;
158+
docker network create tfb > /dev/null 2>&1 && docker run --network=tfb -e USER_ID=$(id -u) -e CI=true -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=`pwd`,target=/FrameworkBenchmarks techempower/tfb --mode verify --test-dir $RUN_TESTS --results-environment Github-Actions;
159159
dependabot:
160160
needs: verify
161161
runs-on: ubuntu-latest

Dockerfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN apt-get -yqq update && \
1313
gcc \
1414
git-core \
1515
gosu \
16+
iproute2 \
1617
# Needed for mysqlclient
1718
libmysqlclient-dev \
1819
libpq-dev \
@@ -43,17 +44,12 @@ RUN curl -LSs "https://github.com/scottchiefbaker/dool/archive/${DOOL_VERSION}.t
4344
tar --strip-components=1 -xz && \
4445
./install.py
4546

46-
# Check if the group ID is already created
47+
# create group and user
4748
ARG GROUP_ID
48-
RUN if ! getent group "$GROUP_ID"; then \
49-
addgroup --gid "$GROUP_ID" user; \
50-
fi
51-
52-
# Check if the user ID is already created
5349
ARG USER_ID
54-
RUN if ! getent passwd "$USER_ID"; then \
55-
adduser --disabled-password --gecos '' --gid "$GROUP_ID" --uid "$USER_ID" user; \
56-
fi
50+
51+
RUN groupadd -g "$GROUP_ID" user || true && \
52+
useradd -m -u "$USER_ID" -g "$GROUP_ID" -s /bin/bash user || true
5753

5854
ENV FWROOT=/FrameworkBenchmarks USER_ID="$USER_ID"
5955
ENV PYTHONPATH="$FWROOT"

frameworks/C++/cuehttp/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

frameworks/C++/cuehttp/benchmark_config.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

frameworks/C++/cuehttp/config.toml

Lines changed: 0 additions & 14 deletions
This file was deleted.

frameworks/C++/cuehttp/cuehttp.dockerfile

Lines changed: 0 additions & 18 deletions
This file was deleted.

frameworks/C++/cuehttp/plaintext/CMakeLists.txt

Lines changed: 0 additions & 21 deletions
This file was deleted.

frameworks/C++/cuehttp/plaintext/main.cpp

Lines changed: 0 additions & 17 deletions
This file was deleted.

frameworks/C++/paozhu/paozhu.dockerfile

Lines changed: 53 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ RUN apt-get install -yqq gcc g++ openssl libssl-dev zlib1g-dev build-essential l
44

55
RUN apt-get -y install brotli libbrotli-dev
66
RUN apt-get -y install libreadline-dev
7-
RUN apt-get -y install mysql-client
8-
RUN apt-get -y install libmysqlclient-dev
7+
# RUN apt-get -y install mysql-client
8+
# RUN apt-get -y install libmysqlclient-dev
99

1010
RUN locale-gen en_US.UTF-8
1111
ENV LANG en_US.UTF-8
@@ -18,16 +18,20 @@ WORKDIR /
1818
# RUN wget https://github.com/hggq/paozhu/releases/download/v1.5.8/benchmark.zip
1919
RUN git clone https://github.com/hggq/paozhu
2020
# RUN unzip benchmark.zip
21-
# RUN rm -Rf ./paozhu/controller
22-
# RUN rm -Rf ./paozhu/libs
21+
RUN rm -Rf ./paozhu/controller
22+
RUN rm -Rf ./paozhu/libs
2323
# RUN rm -Rf ./paozhu/view
24-
# RUN rm -Rf ./paozhu/viewsrc
25-
# RUN rm -Rf ./paozhu/orm
26-
# RUN rm -Rf ./paozhu/models
27-
# RUN rm -Rf ./paozhu/common
28-
29-
30-
24+
RUN rm -Rf ./paozhu/viewsrc
25+
RUN rm -Rf ./paozhu/orm
26+
RUN rm -Rf ./paozhu/models
27+
#RUN rm -Rf ./paozhu/common
28+
RUN rm -Rf ./paozhu/common/autocontrolmethod.hpp
29+
RUN rm -Rf ./paozhu/common/autorestfulpaths.hpp
30+
RUN rm -Rf ./paozhu/common/json_reflect_headers.h
31+
RUN rm -Rf ./paozhu/common/reghttpmethod_pre.hpp
32+
RUN rm -Rf ./paozhu/common/reghttpmethod.hpp
33+
RUN rm -Rf ./paozhu/common/websockets_method_reg.hpp
34+
RUN rm -Rf ./paozhu/common/httphook.cpp
3135
# COPY ./paozhu_benchmark/controller ./paozhu/
3236
# COPY ./paozhu_benchmark/libs ./paozhu/
3337
# COPY ./paozhu_benchmark/view ./paozhu/
@@ -39,29 +43,29 @@ RUN git clone https://github.com/hggq/paozhu
3943

4044
# RUN ls -l ./paozhu
4145
# RUN pwd
42-
# RUN mkdir ./paozhu/common
43-
# RUN mkdir ./paozhu/libs
44-
# RUN mkdir ./paozhu/libs/types
45-
# COPY ./paozhu_benchmark/libs/types/techempower_json.h ./paozhu/libs/types/
46-
# COPY ./paozhu_benchmark/libs/types/techempower_json_jsonreflect.cpp ./paozhu/libs/types/
46+
#RUN mkdir ./paozhu/common
47+
RUN mkdir ./paozhu/libs
48+
RUN mkdir ./paozhu/libs/types
49+
COPY ./paozhu_benchmark/libs/types/techempower_json.h ./paozhu/libs/types/
50+
COPY ./paozhu_benchmark/libs/types/techempower_json_jsonreflect.cpp ./paozhu/libs/types/
4751

48-
# RUN mkdir ./paozhu/controller
49-
# RUN mkdir ./paozhu/controller/include
50-
# RUN mkdir ./paozhu/controller/src
52+
RUN mkdir ./paozhu/controller
53+
RUN mkdir ./paozhu/controller/include
54+
RUN mkdir ./paozhu/controller/src
5155

52-
# COPY ./paozhu_benchmark/controller/include/techempower.h ./paozhu/controller/include/
53-
# COPY ./paozhu_benchmark/controller/src/techempower.cpp ./paozhu/controller/src/
56+
COPY ./paozhu_benchmark/controller/include/techempower.h ./paozhu/controller/include/
57+
COPY ./paozhu_benchmark/controller/src/techempower.cpp ./paozhu/controller/src/
5458

5559

56-
# COPY ./paozhu_benchmark/common/autocontrolmethod.hpp ./paozhu/common/
57-
# COPY ./paozhu_benchmark/common/reghttpmethod_pre.hpp ./paozhu/common/
58-
# COPY ./paozhu_benchmark/common/reghttpmethod.hpp ./paozhu/common/
59-
# COPY ./paozhu_benchmark/common/json_reflect_headers.h ./paozhu/common/
60+
COPY ./paozhu_benchmark/common/autocontrolmethod.hpp ./paozhu/common/
61+
COPY ./paozhu_benchmark/common/reghttpmethod_pre.hpp ./paozhu/common/
62+
COPY ./paozhu_benchmark/common/reghttpmethod.hpp ./paozhu/common/
63+
COPY ./paozhu_benchmark/common/json_reflect_headers.h ./paozhu/common/
6064

61-
# COPY ./paozhu_benchmark/common/cost_define.h ./paozhu/common/
62-
# COPY ./paozhu_benchmark/common/autorestfulpaths.hpp ./paozhu/common/
63-
# COPY ./paozhu_benchmark/common/websockets_method_reg.hpp ./paozhu/common/
64-
# COPY ./paozhu_benchmark/common/httphook.cpp ./paozhu/common/
65+
#COPY ./paozhu_benchmark/common/cost_define.h ./paozhu/common/
66+
COPY ./paozhu_benchmark/common/autorestfulpaths.hpp ./paozhu/common/
67+
COPY ./paozhu_benchmark/common/websockets_method_reg.hpp ./paozhu/common/
68+
COPY ./paozhu_benchmark/common/httphook.cpp ./paozhu/common/
6569

6670
COPY ./paozhu_benchmark/conf/server.conf ./paozhu/conf/server.conf
6771
COPY ./paozhu_benchmark/conf/orm.conf ./paozhu/conf/orm.conf
@@ -74,32 +78,34 @@ COPY ./paozhu_benchmark/CMakeLists.txt ./paozhu/CMakeLists.txt
7478

7579
# COPY ./paozhu_benchmark/view/techempower/fortunes.html ./paozhu/view/techempower/
7680

77-
# RUN mkdir ./paozhu/viewsrc
78-
# RUN mkdir ./paozhu/viewsrc/include
79-
# RUN mkdir ./paozhu/viewsrc/view
80-
# RUN mkdir ./paozhu/viewsrc/view/techempower
81+
RUN mkdir ./paozhu/viewsrc
82+
RUN mkdir ./paozhu/viewsrc/include
83+
RUN mkdir ./paozhu/viewsrc/view
84+
RUN mkdir ./paozhu/viewsrc/view/techempower
8185

82-
# COPY ./paozhu_benchmark/viewsrc/view/techempower/fortunes.cpp ./paozhu/viewsrc/view/techempower/
83-
# COPY ./paozhu_benchmark/viewsrc/include/viewsrc.h ./paozhu/viewsrc/include/
84-
# COPY ./paozhu_benchmark/viewsrc/include/regviewmethod.hpp ./paozhu/viewsrc/include/
86+
COPY ./paozhu_benchmark/viewsrc/view/techempower/fortunes.cpp ./paozhu/viewsrc/view/techempower/
87+
COPY ./paozhu_benchmark/viewsrc/include/viewsrc.h ./paozhu/viewsrc/include/
88+
COPY ./paozhu_benchmark/viewsrc/include/regviewmethod.hpp ./paozhu/viewsrc/include/
8589

8690

8791

88-
# RUN mkdir ./paozhu/orm
89-
# RUN mkdir ./paozhu/orm/include
92+
RUN mkdir ./paozhu/orm
93+
RUN mkdir ./paozhu/orm/include
9094

9195

92-
# COPY ./paozhu_benchmark/orm/orm.h ./paozhu/orm/
93-
# COPY ./paozhu_benchmark/orm/include/fortunebase.h ./paozhu/orm/include/
94-
# COPY ./paozhu_benchmark/orm/include/worldbase.h ./paozhu/orm/include/
96+
COPY ./paozhu_benchmark/orm/orm.h ./paozhu/orm/
97+
COPY ./paozhu_benchmark/orm/include/fortunebase.h ./paozhu/orm/include/
98+
COPY ./paozhu_benchmark/orm/include/worldbase.h ./paozhu/orm/include/
99+
COPY ./paozhu_benchmark/orm/include/fortune_mysql.h ./paozhu/orm/include/
100+
COPY ./paozhu_benchmark/orm/include/world_mysql.h ./paozhu/orm/include/
95101

96-
# RUN mkdir ./paozhu/models
97-
# RUN mkdir ./paozhu/models/include
102+
RUN mkdir ./paozhu/models
103+
RUN mkdir ./paozhu/models/include
98104

99-
# COPY ./paozhu_benchmark/models/include/Fortune.h ./paozhu/models/include/
100-
# COPY ./paozhu_benchmark/models/include/World.h ./paozhu/models/include/
101-
# COPY ./paozhu_benchmark/models/World.cpp ./paozhu/models/
102-
# COPY ./paozhu_benchmark/models/Fortune.cpp ./paozhu/models/
105+
COPY ./paozhu_benchmark/models/include/Fortune.h ./paozhu/models/include/
106+
COPY ./paozhu_benchmark/models/include/World.h ./paozhu/models/include/
107+
COPY ./paozhu_benchmark/models/World.cpp ./paozhu/models/
108+
COPY ./paozhu_benchmark/models/Fortune.cpp ./paozhu/models/
103109

104110
WORKDIR /paozhu
105111
RUN unzip asio.zip

0 commit comments

Comments
 (0)