forked from TechEmpower/FrameworkBenchmarks
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/TechEmpower/FrameworkBenc…
- Loading branch information
Showing
117 changed files
with
1,898 additions
and
2,056 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
{ | ||
"framework": "cinatra", | ||
"tests": [{ | ||
"default": { | ||
"plaintext_url": "/plaintext", | ||
"port": 8090, | ||
"approach": "Realistic", | ||
"classification": "Fullstack", | ||
"database": "None", | ||
"framework": "cinatra", | ||
"language": "C++", | ||
"flavor": "None", | ||
"orm": "None", | ||
"platform": "None", | ||
"webserver": "None", | ||
"os": "Linux", | ||
"database_os": "Linux", | ||
"display_name": "cinatra", | ||
"notes": "", | ||
"versus": "cinatra" | ||
"tests": [ | ||
{ | ||
"default": { | ||
"plaintext_url": "/plaintext", | ||
"port": 8090, | ||
"approach": "Realistic", | ||
"classification": "Fullstack", | ||
"database": "None", | ||
"framework": "cinatra", | ||
"language": "C++", | ||
"flavor": "None", | ||
"orm": "None", | ||
"platform": "None", | ||
"webserver": "None", | ||
"os": "Linux", | ||
"database_os": "Linux", | ||
"display_name": "cinatra", | ||
"notes": "", | ||
"versus": "cinatra" | ||
} | ||
} | ||
}] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,11 @@ | ||
FROM ubuntu:18.04 | ||
FROM ubuntu:22.04 | ||
RUN apt-get update -yqq && \ | ||
apt-get install -yqq cmake git uuid-dev gcc g++ autoconf | ||
ENV ASIO=/asio | ||
ENV ASIO_INTERNAL=/asio/asio | ||
ENV CINATRA=/cinatra | ||
ENV CINATRA_EXAMPLE=/cinatra/example | ||
WORKDIR / | ||
RUN git clone https://github.com/chriskohlhoff/asio.git | ||
WORKDIR $ASIO | ||
RUN git checkout 8087252a0c3c2f0baad96ddbd6554db17a846376 | ||
WORKDIR $ASIO_INTERNAL | ||
RUN ./autogen.sh && ./configure | ||
RUN make && make install | ||
WORKDIR / | ||
RUN git clone https://github.com/qicosmos/cinatra.git | ||
WORKDIR $CINATRA | ||
RUN git checkout 5acb35cd72c3f72512c0a55e7dea9e25d7779039 | ||
WORKDIR $CINATRA_EXAMPLE | ||
RUN mkdir build && cd build && cmake .. && make | ||
RUN git checkout c9bec308e27174c8b7f0f01c92652509f7b47253 | ||
RUN mkdir build && cd build && cmake .. && make -j | ||
EXPOSE 8090 | ||
CMD ./build/cinatra_example | ||
CMD ./build/example/benchmark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
#include <iostream> | ||
#include <include/cinatra.hpp> | ||
#include <iostream> | ||
|
||
using namespace cinatra; | ||
using namespace std::chrono_literals; | ||
|
||
int main() { | ||
http_server server(std::thread::hardware_concurrency()); | ||
bool r = server.listen("0.0.0.0", "8090"); | ||
if (!r) { | ||
std::cout << "listen failed\n"; | ||
return -1; | ||
} | ||
|
||
server.enable_timeout(false); | ||
server.set_http_handler<GET>("/plaintext", [](request& req, response& res) { | ||
res.set_status_and_content<status_type::ok,res_content_type::string>("Hello, World!"); | ||
}); | ||
|
||
server.run(); | ||
return 0; | ||
coro_http_server server(std::thread::hardware_concurrency(), 8090); | ||
server.set_http_handler<GET>( | ||
"/plaintext", [](coro_http_request &req, coro_http_response &resp) { | ||
resp.need_date_head(false); | ||
resp.set_status_and_content(status_type::ok, "Hello, world!"); | ||
}); | ||
server.sync_start(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.