diff options
author | Antoine GIRARD <sapk@users.noreply.github.com> | 2019-09-04 21:53:54 +0200 |
---|---|---|
committer | Lauris BH <lauris.buksis@zzdats.lv> | 2019-09-04 22:53:54 +0300 |
commit | 9fe4437bda13aeec183f004af138254f351c279f (patch) | |
tree | 5255ced1684f767a6bb7eadda4ced8d0df5764b7 /vendor/github.com/pelletier/go-toml/benchmark.sh | |
parent | 4cb1bdddc88580d20305415869d4c13827097bd9 (diff) | |
download | gitea-9fe4437bda13aeec183f004af138254f351c279f.tar.gz gitea-9fe4437bda13aeec183f004af138254f351c279f.zip |
Use vendored go-swagger (#8087)
* Use vendored go-swagger
* vendor go-swagger
* revert un wanteed change
* remove un-needed GO111MODULE
* Update Makefile
Co-Authored-By: techknowlogick <matti@mdranta.net>
Diffstat (limited to 'vendor/github.com/pelletier/go-toml/benchmark.sh')
-rw-r--r-- | vendor/github.com/pelletier/go-toml/benchmark.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/vendor/github.com/pelletier/go-toml/benchmark.sh b/vendor/github.com/pelletier/go-toml/benchmark.sh new file mode 100644 index 0000000000..8b8bb528e7 --- /dev/null +++ b/vendor/github.com/pelletier/go-toml/benchmark.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +set -e + +reference_ref=${1:-master} +reference_git=${2:-.} + +if ! `hash benchstat 2>/dev/null`; then + echo "Installing benchstat" + go get golang.org/x/perf/cmd/benchstat + go install golang.org/x/perf/cmd/benchstat +fi + +tempdir=`mktemp -d /tmp/go-toml-benchmark-XXXXXX` +ref_tempdir="${tempdir}/ref" +ref_benchmark="${ref_tempdir}/benchmark-`echo -n ${reference_ref}|tr -s '/' '-'`.txt" +local_benchmark="`pwd`/benchmark-local.txt" + +echo "=== ${reference_ref} (${ref_tempdir})" +git clone ${reference_git} ${ref_tempdir} >/dev/null 2>/dev/null +pushd ${ref_tempdir} >/dev/null +git checkout ${reference_ref} >/dev/null 2>/dev/null +go test -bench=. -benchmem | tee ${ref_benchmark} +popd >/dev/null + +echo "" +echo "=== local" +go test -bench=. -benchmem | tee ${local_benchmark} + +echo "" +echo "=== diff" +benchstat -delta-test=none ${ref_benchmark} ${local_benchmark}
\ No newline at end of file |