-
Notifications
You must be signed in to change notification settings - Fork 683
Improve 'tools/run-perf-test.sh' #877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve 'tools/run-perf-test.sh' #877
Conversation
@zherczeg, @akiss77, could you review this? |
|
||
JERRY=$1 | ||
TEST=$2 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need here something like this below?
# Check if the specified build supports memory statistics options
function is_mem_stats_build
{
[ -x "$1" ] || fail_msg "Engine '$1' is not executable"
tmpfile=`mktemp`
"$1" --mem-stats $tmpfile 2>&1 | grep -- "Ignoring memory statistics option because of '!MEM_STATS' build configuration." 2>&1 > /dev/null
code=$?
rm $tmpfile
return $code
}
is_mem_stats_build "$JERRY" && fail_msg "Engine specified should be built with memory statistics support"
Yes, it smells like copy-pasting...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put this check in run-perf.sh
, so it is not necessary to check that here too until this script is only used from there. We can place a double check here, but in that case the is_mem_stats_build
function will be in three different files (run-perf.sh, mem-stats.sh, mem-stats-measure.sh
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahem, if this script is executed only from run-perf.sh
then why do we need it separated? Why not just write this single line there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akiss77, because of the current implementation of 'run-compare()' helper function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me then.
Other than the above, it's OK with me. |
LGTM |
Always write results on stdout and save markdown file optionally. Use "Peak allocated" if binaries were built with MEM_STATS. JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
6fbe1c4
to
ed12df5
Compare
Always write results on stdout and save markdown file optionally.
Use "Peak allocated" if binaries were built with MEM_STATS.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com