Skip to content

Commit f14997a

Browse files
committed
2 parents b43eaed + 3204088 commit f14997a

File tree

128 files changed

+1709
-657
lines changed

Some content is hidden

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

128 files changed

+1709
-657
lines changed

frameworks/C++/just-boost/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Just.Boost Benchmarking Test
2+
3+
## Description
4+
5+
Backend using just C++(20) and Boost.
6+
7+
## Run Test
8+
9+
cd FrameworkBenchmarks/
10+
./tfb --mode verify --test just-boost
11+
12+
## Software Versions
13+
14+
- [Alpine 3.18](https://hub.docker.com/_/alpine)
15+
- [gcc](https://gcc.gnu.org/)
16+
- [c++20](https://en.cppreference.com/w/cpp/20)
17+
- [Boost](https://www.boost.org/)
18+
- [Beast](https://www.boost.org/doc/libs/1_83_0/libs/beast/doc/html/index.html) ([HTTP Server with C++ 20 coroutine](https://www.boost.org/doc/libs/1_83_0/libs/beast/example/http/server/awaitable/http_server_awaitable.cpp))
19+
- [JSON](https://www.boost.org/doc/libs/1_83_0/libs/json/doc/html/index.html)
20+
- [libpq — C Library](https://www.postgresql.org/docs/current/libpq.html) (PostgreSQL client)
21+
22+
## Test URLs
23+
24+
### Test 1: JSON Encoding
25+
26+
http://localhost:8000/json
27+
28+
### Test 2: Single Row Query
29+
30+
http://localhost:8000/db
31+
32+
### Test 3: Multi Row Query
33+
34+
http://localhost:8000/queries/{count}
35+
36+
### Test 6: Plaintext
37+
38+
http://localhost:8000/plaintext
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"framework": "just-boost",
3+
"tests": [
4+
{
5+
"default": {
6+
"json_url": "/json",
7+
"plaintext_url": "/plaintext",
8+
"db_url": "/db",
9+
"query_url": "/queries/",
10+
"port": 8000,
11+
"approach": "Realistic",
12+
"classification": "Micro",
13+
"database": "Postgres",
14+
"framework": "Boost",
15+
"language": "C++",
16+
"orm": "Raw",
17+
"platform": "None",
18+
"webserver": "None",
19+
"os": "Linux",
20+
"database_os": "Linux",
21+
"display_name": "just-boost",
22+
"notes": "",
23+
"versus": ""
24+
}
25+
}
26+
]
27+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# docker build --progress=plain --build-arg CXXFLAGS="-Wall" -t just-boost -f just-boost.dockerfile .
2+
# docker run --rm --name just-boost -p 8000:8000 -d just-boost
3+
# docker container stop just-boost
4+
FROM alpine:3.18
5+
6+
ARG APP=just-boost
7+
ARG CXXFLAGS=-O3
8+
9+
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
10+
ENV BCPP_PG_CONN_STR="postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world"
11+
ENV BCPP_N_THREADS=32
12+
13+
WORKDIR /usr/src/${APP}
14+
15+
RUN apk add --no-cache build-base boost-dev libpq-dev
16+
COPY *.cpp ./
17+
RUN g++ ${CXXFLAGS} -std=c++20 \
18+
-I$(pg_config --includedir) \
19+
-o main main.cpp \
20+
-L$(pg_config --libdir) -lpq \
21+
&& rm *.cpp
22+
23+
EXPOSE 8000
24+
25+
CMD ["./main"]

0 commit comments

Comments
 (0)