Can now build multiple performance logs
`make perf` will build, by default, perf.log, but you may also build perf.*; for example: $ make perf.1 # make some changes $ make perf.2 This allows comparing changes easily.newmaster
parent
e85a7653e8
commit
1079630bd4
|
@ -19,7 +19,7 @@ configure
|
|||
config.*
|
||||
|
||||
# script output
|
||||
perf.out
|
||||
perf.*
|
||||
|
||||
# should be added using autoreconf -i
|
||||
INSTALL
|
||||
|
|
|
@ -112,9 +112,10 @@ test: check
|
|||
check: $(src_tests) test-suite
|
||||
|
||||
# performance tests
|
||||
perf:
|
||||
perf: perf.log
|
||||
perf.%: FORCE
|
||||
if HAS_NODE
|
||||
@$(path_test)/perf/runner @PERF_TESTS@
|
||||
@$(path_test)/perf/runner @PERF_TESTS@ > "$@"
|
||||
else
|
||||
@echo "Node.js must be installed in order to run performance tests"
|
||||
@exit 1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2014 Mike Gerwitz
|
||||
#
|
||||
|
@ -21,16 +21,10 @@
|
|||
# $ column -ts\| perf.out
|
||||
# #
|
||||
|
||||
rawout=perf.out
|
||||
>"$rawout"
|
||||
|
||||
for f in "$@"; do
|
||||
@NODE@ "$f" || exit $?
|
||||
done \
|
||||
| tee -a "$rawout" \
|
||||
| awk -F\| '
|
||||
| tee >( awk -F\| '
|
||||
# format for display as the tests are running
|
||||
{ printf "%s (x%s = %ss each): %s\n", $4, $2, $3, $1 }
|
||||
'
|
||||
|
||||
echo "Raw data written to $rawout" >&2
|
||||
' >&2 )
|
||||
|
|
Loading…
Reference in New Issue