Files
forgetting/tools/diffbench/Dockerfile
T
maenekoandClaude Sonnet 5.5 18106115f7
ci / check (push) Successful in 6m6s
Start the Go rewrite: jsjson, awg-ctrl port, differential bench
- internal/jsjson: JSON.stringify-compatible encoder and order-preserving decoder,
  tested against fixtures produced by Node itself
- internal/ctrl: awg-ctrl in Go (params, vpn:// keys, users, peers, sync, 3.1
  upgrade, CAKE shaping, metrics, monitor job, Express-compatible HTTP layer)
- internal/iauth, internal/logx: internal Ed25519 tokens and logging
- tools/diffbench: Docker bench with stubbed awg/ip/tc/nft that runs one scenario
  against the TS and Go implementations for comparison

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 15:27:05 +03:00

12 lines
972 B
Docker

# Дифференциальный стенд: TS- и Go-версии awg-ctrl против одних и тех же заглушек.
FROM node:20-bookworm
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends openssl sqlite3 >/dev/null && rm -rf /var/lib/apt/lists/*
COPY tools/diffbench/stubs/stub.mjs /opt/stub/stub.mjs
RUN for c in awg awg-quick ip tc nft modinfo; do printf '#!/bin/sh\nexec node /opt/stub/stub.mjs %s "$@"\n' "$c" > /usr/local/bin/$c; chmod +x /usr/local/bin/$c; done
# TS-эталон: тот же код, что в репозитории, со своими node_modules под linux
COPY awg-ctrl/package.json /ts/awg-ctrl/package.json
RUN cd /ts/awg-ctrl && npm install --no-audit --no-fund --loglevel=error
COPY awg-ctrl/index.ts awg-ctrl/shaping.ts awg-ctrl/tsconfig.json /ts/awg-ctrl/
COPY tools/diffbench/setup.sh tools/diffbench/run.sh tools/diffbench/scenario-ctrl.mjs tools/diffbench/collect.mjs /bench/
WORKDIR /bench