Skip to content

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

Merged

Conversation

LaszloLango
Copy link
Contributor

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

@LaszloLango LaszloLango added enhancement An improvement tools Related to the tooling scripts labels Feb 12, 2016
@LaszloLango
Copy link
Contributor Author

@zherczeg, @akiss77, could you review this?


JERRY=$1
TEST=$2

Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me then.

@akosthekiss
Copy link
Member

Other than the above, it's OK with me.

@zherczeg
Copy link
Member

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
@LaszloLango LaszloLango force-pushed the improve-run-perf-test branch from 6fbe1c4 to ed12df5 Compare February 16, 2016 13:51
@LaszloLango LaszloLango merged commit ed12df5 into jerryscript-project:master Feb 16, 2016
@LaszloLango LaszloLango deleted the improve-run-perf-test branch February 17, 2016 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement tools Related to the tooling scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants