Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: pkg/kernel/test/ast_membench.sh

Issue 2665723002: Implement canonical name scheme in kernel. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 testdir=$(dirname $0)
kustermann 2017/02/01 13:00:55 add #!/bin/sh and chmod +x ?
asgerf 2017/02/02 12:30:27 Done.
2 first_input=10
3 first_output=$(mktemp)
4 dart --print-metrics $testdir/ast_membench.dart $1 $first_input >/dev/null 2>$fi rst_output
5 second_input=20
6 second_output=$(mktemp)
7 dart --print-metrics $testdir/ast_membench.dart $1 $second_input >/dev/null 2>$s econd_output
8
9 bytes1=$(fgrep 'heap.old.used.max' $first_output | head -n1 | cut -d' ' -f4)
10 bytes2=$(fgrep 'heap.old.used.max' $second_output | head -n1 | cut -d' ' -f4)
11
12 bytes=$(echo "($bytes2 - $bytes1)/($second_input - $first_input)" | bc)
13 mega_bytes=$(echo "$bytes / 1000000" | bc)
14 printf "Memory usage = %d B (%2.2f MB)" $bytes $mega_bytes
15 echo
kustermann 2017/02/01 13:00:55 remove first_output/second_output again
asgerf 2017/02/02 12:30:27 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698