mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-09 01:22:16 +00:00
Implementation of the libp2p perf protocol according to https://github.com/libp2p/specs/pull/478/. //CC @MarcoPolo as the author of the specification. **Don't (yet) expect this to produce reliable performance metrics.** Pull-Request: #3508.
23 lines
711 B
Docker
23 lines
711 B
Docker
# syntax=docker/dockerfile:1.5-labs
|
|
FROM rust:1.67.0 as builder
|
|
|
|
# Run with access to the target cache to speed up builds
|
|
WORKDIR /workspace
|
|
ADD . .
|
|
RUN --mount=type=cache,target=./target \
|
|
--mount=type=cache,target=/usr/local/cargo/registry \
|
|
cargo build --release --package libp2p-perf
|
|
|
|
RUN --mount=type=cache,target=./target \
|
|
mv ./target/release/perf-server /usr/local/bin/perf-server
|
|
|
|
RUN --mount=type=cache,target=./target \
|
|
mv ./target/release/perf-client /usr/local/bin/perf-client
|
|
|
|
FROM debian:bullseye-slim
|
|
|
|
COPY --from=builder /usr/local/bin/perf-server /usr/local/bin/perf-server
|
|
COPY --from=builder /usr/local/bin/perf-client /usr/local/bin/perf-client
|
|
|
|
ENTRYPOINT [ "perf-server"]
|