1
0
Fork 0

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
Mike Gerwitz 2014-03-29 20:13:26 -04:00
parent e85a7653e8
commit 1079630bd4
3 changed files with 7 additions and 12 deletions

2
.gitignore vendored
View File

@ -19,7 +19,7 @@ configure
config.*
# script output
perf.out
perf.*
# should be added using autoreconf -i
INSTALL

View File

@ -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

View File

@ -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 )