-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: modularize server-fixture * Update crates/server-fixture/server/Cargo.toml add newline Co-authored-by: sinu.eth <65924192+sinui0@users.noreply.github.com> * test: add browser benches * fix deps * ci: run ci workflow for all pull requests (#571) * misc fixes * fix clippy * don't log a non-critical error to stderr * use incognito (mitigates random hangs) * add notes * distinguish prover kind when plotting --------- Co-authored-by: sinu.eth <65924192+sinui0@users.noreply.github.com> Co-authored-by: Hendrik Eeckhaut <hendrik@eeckhaut.org> Co-authored-by: Ubuntu <ubuntu@ip-10-35-1-164.eu-central-1.compute.internal>
- Loading branch information
1 parent
66db534
commit 6b845fd
Showing
39 changed files
with
1,442 additions
and
158 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,2 @@ | ||
/target | ||
/.git |
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,27 @@ | ||
name: Run Benchmarks In The Browser | ||
on: | ||
# manual trigger | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run-benchmarks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build Docker Image | ||
run: | | ||
docker build -t tlsn-bench . -f ./crates/benches/binary/benches.Dockerfile --build-arg BENCH_TYPE=browser | ||
- name: Run Benchmarks | ||
run: | | ||
docker run --privileged -v ${{ github.workspace }}/crates/benches/binary:/benches tlsn-bench | ||
- name: Upload runtime_vs_latency.html | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: benchmark_graphs | ||
path: | | ||
./crates/benches/binary/runtime_vs_latency.html | ||
./crates/benches/binary/runtime_vs_bandwidth.html |
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 |
---|---|---|
|
@@ -7,8 +7,6 @@ on: | |
tags: | ||
- "[v]?[0-9]+.[0-9]+.[0-9]+*" | ||
pull_request: | ||
branches: | ||
- dev | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
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 was deleted.
Oops, something went wrong.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM rust AS builder | ||
WORKDIR /usr/src/tlsn | ||
COPY . . | ||
|
||
ARG BENCH_TYPE=native | ||
|
||
RUN \ | ||
if [ "$BENCH_TYPE" = "browser" ]; then \ | ||
# ring's build script needs clang. | ||
apt update && apt install -y clang; \ | ||
rustup install nightly; \ | ||
rustup component add rust-src --toolchain nightly; \ | ||
cargo install wasm-pack; \ | ||
cd crates/benches/browser/wasm; \ | ||
rustup run nightly wasm-pack build --release --target web; \ | ||
cd ../../binary; \ | ||
cargo build --release --features browser-bench; \ | ||
else \ | ||
cd crates/benches/binary; \ | ||
cargo build --release; \ | ||
fi | ||
|
||
FROM debian:latest | ||
|
||
ARG BENCH_TYPE=native | ||
|
||
RUN apt update && apt upgrade -y && apt install -y --no-install-recommends \ | ||
iproute2 \ | ||
sudo | ||
|
||
RUN \ | ||
if [ "$BENCH_TYPE" = "browser" ]; then \ | ||
# Using Chromium since Chrome for Linux is not available on ARM. | ||
apt install -y chromium; \ | ||
fi | ||
|
||
RUN apt clean && rm -rf /var/lib/apt/lists/* | ||
|
||
COPY --from=builder ["/usr/src/tlsn/target/release/bench", "/usr/src/tlsn/target/release/prover", "/usr/src/tlsn/target/release/verifier", "/usr/src/tlsn/target/release/plot", "/usr/local/bin/"] | ||
|
||
ENV PROVER_PATH="/usr/local/bin/prover" | ||
ENV VERIFIER_PATH="/usr/local/bin/verifier" | ||
|
||
VOLUME [ "/benches" ] | ||
WORKDIR "/benches" | ||
CMD ["/bin/bash", "-c", "bench && plot /benches/metrics.csv && cat /benches/metrics.csv"] |
File renamed without changes.
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.