mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-12 17:59:06 +02:00
[ci] Remove the temporary management timing workflow
The branch-only profiling runs are done. Measured on healthy runners, the MySQL management/server package went from 10m16s to 6m36s and the store package from 4m20s to 2m41s, with per-test store setup down from about 1.6s to about 0.5s. Postgres management/server went to 5m44s with store setup at about 0.3s. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EsVtbd7MxMVsS9vP1H6KPS
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
c6e564caf0
commit
5d9b1fc444
@@ -1,100 +0,0 @@
|
||||
# Temporary: profiles the management unit suite per store engine from a working
|
||||
# branch. Delete before merging.
|
||||
name: Management timing (temporary)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "work/amazing-wright-6xehqh"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test_management:
|
||||
name: "Management / Unit timing"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: ["amd64"]
|
||||
store: ["sqlite", "postgres", "mysql"]
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
||||
with:
|
||||
go-version-file: "go.mod"
|
||||
cache: false
|
||||
|
||||
- name: Get Go environment
|
||||
run: |
|
||||
echo "cache=$(go env GOCACHE)" >> $GITHUB_ENV
|
||||
echo "modcache=$(go env GOMODCACHE)" >> $GITHUB_ENV
|
||||
|
||||
- name: Cache Go modules
|
||||
uses: actions/cache/restore@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||
with:
|
||||
path: |
|
||||
${{ env.cache }}
|
||||
${{ env.modcache }}
|
||||
key: ${{ runner.os }}-gotest-cache-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gotest-cache-
|
||||
|
||||
- name: Install modules
|
||||
run: go mod tidy
|
||||
|
||||
- name: Login to Docker hub
|
||||
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
|
||||
- name: docker login for root user
|
||||
env:
|
||||
DOCKER_USER: ${{ secrets.DOCKER_USER }}
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
run: echo "$DOCKER_TOKEN" | sudo docker login --username "$DOCKER_USER" --password-stdin
|
||||
|
||||
- name: download mysql image
|
||||
if: matrix.store == 'mysql'
|
||||
run: |
|
||||
docker pull mlsmaycon/warmed-mysql:8
|
||||
docker image inspect mlsmaycon/warmed-mysql:8 --format 'entrypoint={{json .Config.Entrypoint}} cmd={{json .Config.Cmd}} env={{json .Config.Env}}'
|
||||
|
||||
- name: Runner calibration
|
||||
run: |
|
||||
nproc
|
||||
grep -m1 "model name" /proc/cpuinfo
|
||||
time dd if=/dev/zero of=/tmp/calib bs=1M count=256 conv=fsync
|
||||
time sh -c 'for i in $(seq 1 200); do dd if=/dev/zero of=/tmp/calib-$i bs=4k count=1 conv=fsync 2>/dev/null; done'
|
||||
rm -f /tmp/calib*
|
||||
|
||||
- name: Build test summarizer
|
||||
run: go build -o /tmp/gotestsummary ./tools/gotestsummary
|
||||
|
||||
- name: Test
|
||||
shell: bash
|
||||
run: |
|
||||
set -o pipefail
|
||||
CGO_ENABLED=1 GOARCH=${{ matrix.arch }} \
|
||||
NETBIRD_STORE_ENGINE=${{ matrix.store }} \
|
||||
CI=true \
|
||||
go test -json -tags=devcert -coverprofile=coverage.txt \
|
||||
-exec "sudo --preserve-env=CI,NETBIRD_STORE_ENGINE" \
|
||||
-timeout 45m ./management/... ./shared/management/... \
|
||||
| tee test-output.jsonl | /tmp/gotestsummary -slowest 80
|
||||
|
||||
- name: Upload raw test events
|
||||
if: always()
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
|
||||
with:
|
||||
name: test-output-${{ matrix.store }}
|
||||
path: test-output.jsonl
|
||||
if-no-files-found: ignore
|
||||
Reference in New Issue
Block a user