Skip to content

Commit

Permalink
fix: benchmark comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Oct 24, 2024
1 parent 6f8b780 commit 326ab0c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/performance/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ compare:
CACHE --id go-mod-cache /go/pkg/mod
CACHE --id go-cache /root/.cache/go-build
RUN go install golang.org/x/perf/cmd/benchstat@latest
WORKDIR /src/test/performance
ARG args=""
ARG args="-bench=."
ARG rev=main

COPY +run/benchmark-output.txt /report/benchmark-output-local.txt
COPY github.com/formancehq/ledger:${rev}+run/benchmark-output.txt /report/benchmark-output-remote.txt
COPY (+run/benchmark-output.txt --args=$args) /report/benchmark-output-local.txt
COPY --allow-privileged (github.com/formancehq/ledger/test/performance:${rev}+run/benchmark-output.txt --args=$args) /report/benchmark-output-remote.txt

RUN benchstat /report/benchmark-output-local.txt /report/benchmark-output-remote.txt > benchmark-comparison.txt

RUN benchstat /report/benchmark-output-local.txt /report/benchmark-output-remote.txt
SAVE ARTIFACT benchmark-comparison.txt AS LOCAL benchmark-comparison.txt

generate-graphs:
FROM core+base-image
Expand Down

0 comments on commit 326ab0c

Please sign in to comment.