Skip to content

Commit cc9eb1d

Browse files
committed
Add zbench.sh and zfuzz.sh scripts
The scripts wrap internal/tool/bench and internal/tool/fuzz and makes it easier to invoke those tools from the repository root.
1 parent c57be8a commit cc9eb1d

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

zbench.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2017, Joe Tsai. All rights reserved.
4+
# Use of this source code is governed by a BSD-style
5+
# license that can be found in the LICENSE.md file.
6+
7+
# zbench wraps internal/tool/bench and is useful for comparing benchmarks from
8+
# the implementations in this repository relative to other implementations.
9+
#
10+
# See internal/tool/bench/main.go for more details.
11+
cd $(dirname "${BASH_SOURCE[0]}")/internal/tool/bench
12+
go run $(go list -f '{{ join .GoFiles "\n" }}') "$@"

zfuzz.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2017, Joe Tsai. All rights reserved.
4+
# Use of this source code is governed by a BSD-style
5+
# license that can be found in the LICENSE.md file.
6+
7+
# zfuzz wraps internal/tool/fuzz and is useful for fuzz testing each of
8+
# the implementations in this repository.
9+
cd $(dirname "${BASH_SOURCE[0]}")/internal/tool/fuzz
10+
./fuzz.sh "$@"

zprof.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if [ $# == 0 ]; then
88
echo "Usage: $0 PKG_PATH TEST_ARGS..."
99
echo ""
1010
echo "Runs coverage and performance benchmarks for a given package."
11-
echo "The results are stored in the _zprof_ directory"
11+
echo "The results are stored in the _zprof_ directory."
1212
echo ""
1313
echo "Example:"
1414
echo " $0 flate -test.bench=Decode/Twain/Default"

0 commit comments

Comments
 (0)