-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a primitive throughput benchmark (#15)
* add throughput bench * add docker bench
- Loading branch information
Showing
4 changed files
with
117 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM gcc:13 AS cpp-base | ||
|
||
RUN set -ex; \ | ||
apt-get update && \ | ||
apt-get install -y cmake locales && \ | ||
locale-gen en_US.UTF-8 | ||
|
||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
RUN mkdir /app | ||
COPY . /app | ||
RUN rm -rf /app/.cache | ||
RUN rm -rf /app/build | ||
WORKDIR /app | ||
RUN cmake --preset release | ||
RUN cmake --build --preset release | ||
|
||
ENTRYPOINT ["/app/build/release/main"] | ||
|
||
CMD [] |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: '2.2' | ||
services: | ||
cpp-orderbook-bench: | ||
build: . | ||
container_name: cpp-orderbook-bench | ||
cpus: 1 | ||
privileged: true # for bench only, to avoid kernel mitigations override | ||
cpuset: "1" | ||
command: | ||
- "-duration" | ||
- "30" | ||
- "-start-after" | ||
- "60" | ||
- "-n" | ||
- "throughput" |
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