-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docker compose files and benchmark to POSIX storage (#184)
- Loading branch information
Showing
4 changed files
with
95 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Benchmark | ||
|
||
on: [push, pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
benchmark-mysql: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Start Tessera | ||
run: docker compose -f ./cmd/example-mysql/docker/compose.yaml up --build --detach | ||
- name: Run benchmark | ||
run: go run ./hammer --log_public_key=Test-Betty+df84580a+AQQASqPUZoIHcJAF5mBOryctwFdTV1E0GRY4kEAtTzwB --log_url=http://localhost:2024 --max_read_ops=0 --num_writers=512 --max_write_ops=512 --max_runtime=1m --leaf_write_goal=2500 --show_ui=false | ||
- name: Stop Tessera | ||
if: ${{ always() }} | ||
run: docker compose -f ./cmd/example-mysql/docker/compose.yaml down | ||
|
||
benchmark-posix: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Start Tessera | ||
run: docker compose -f ./cmd/example-posix/docker/compose.yaml up --build --detach | ||
- name: Run benchmark | ||
run: go run ./hammer --log_public_key=example.com/log/testdata+33d7b496+AeHTu4Q3hEIMHNqc6fASMsq3rKNx280NI+oO5xCFkkSx --log_url=http://localhost:2024 --write_log_url=http://localhost:2025 --max_read_ops=0 --num_writers=512 --max_write_ops=512 --max_runtime=1m --leaf_write_goal=2500 --show_ui=false | ||
- name: Stop Tessera | ||
if: ${{ always() }} | ||
run: docker compose -f ./cmd/example-posix/docker/compose.yaml down |
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
FROM golang:1.23.0-alpine3.19@sha256:fe8f9c7d418d3ac91787f11c31071c4814b6da5f9aae55bc581a7aacc264c395 AS build | ||
|
||
WORKDIR /build | ||
|
||
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change | ||
COPY go.mod go.sum ./ | ||
RUN go mod download && go mod verify | ||
|
||
COPY . . | ||
RUN CGO_ENABLED=0 go build -v ./cmd/example-posix | ||
|
||
FROM alpine:3.20@sha256:0a4eaa0eecf5f8c050e5bba433f58c052be7587ee8af3e8b3910ef9ab5fbe9f5 | ||
|
||
COPY --from=build /build/example-posix / | ||
|
||
ENTRYPOINT ["/example-posix"] |
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,44 @@ | ||
services: | ||
|
||
tessera-example-posix-read-proxy: | ||
container_name: tessera-example-posix-read-proxy | ||
image: "busybox:stable" | ||
ports: | ||
- "2024:2024" | ||
command: [ | ||
"/bin/busybox", | ||
"httpd", | ||
"-f", | ||
"-p", | ||
"2024", | ||
"-h", | ||
"/tmp/tessera-posix-log" | ||
] | ||
volumes: | ||
- tiles:/tmp/tessera-posix-log | ||
restart: always | ||
|
||
tessera-example-posix: | ||
container_name: tessera-example-posix | ||
build: | ||
context: ../../../ | ||
dockerfile: ./cmd/example-posix/docker/Dockerfile | ||
ports: | ||
- "2025:2025" | ||
environment: | ||
LOG_PRIVATE_KEY: "PRIVATE+KEY+example.com/log/testdata+33d7b496+AeymY/SZAX0jZcJ8enZ5FY1Dz+wTML2yWSkK+9DSF3eg" | ||
LOG_PUBLIC_KEY: "example.com/log/testdata+33d7b496+AeHTu4Q3hEIMHNqc6fASMsq3rKNx280NI+oO5xCFkkSx" | ||
command: [ | ||
"--storage_dir=/tmp/tessera-posix-log", | ||
"--initialise", | ||
"--listen=:2025", | ||
"--alsologtostderr", | ||
"--v=2", | ||
] | ||
volumes: | ||
- tiles:/tmp/tessera-posix-log | ||
restart: always | ||
|
||
volumes: | ||
tiles: | ||
name: "tiles" |