ceremonyclient/nekryptology/scripts/perf-comp-local

21 lines
523 B
Plaintext
Raw Permalink Normal View History

2023-07-05 05:32:28 +00:00
#! /usr/bin/env bash
set -eo pipefail
ROOT=$( cd "$(dirname "$0")/.."; pwd )
TMP_DIR=$(mktemp -d)
echo "tmp dir: $TMP_DIR"
git clone --depth 1 -b master https://source.quilibrium.com/quilibrium/monorepo.git "$TMP_DIR/monorepo"
cd "$TMP_DIR/monorepo/kryptology"
go test -bench=. -short ./... > "$TMP_DIR/current-bench.log"
cd "$ROOT"
go test -bench=. -short ./... > "$TMP_DIR/new-bench.log"
cd "$ROOT"
go run cmd/benchcomp/main.go -current "$TMP_DIR/current-bench.log" -new "$TMP_DIR/new-bench.log"
rm -rf "$TMP_DIR"