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

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

Issue 2665723002: Implement canonical name scheme in kernel. (Closed)
Patch Set: Address Kevin's comments 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
« no previous file with comments | « pkg/kernel/lib/verifier.dart ('k') | pkg/kernel/test/baseline_tester.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/sh
2 testdir=$(dirname $0)
3 first_input=10
4 first_output=$(mktemp)
5 dart --print-metrics $testdir/ast_membench.dart $1 $first_input >/dev/null 2>$fi rst_output
6 second_input=20
7 second_output=$(mktemp)
8 dart --print-metrics $testdir/ast_membench.dart $1 $second_input >/dev/null 2>$s econd_output
9
10 bytes1=$(fgrep 'heap.old.used.max' $first_output | head -n1 | cut -d' ' -f4)
11 bytes2=$(fgrep 'heap.old.used.max' $second_output | head -n1 | cut -d' ' -f4)
12
13 bytes=$(echo "($bytes2 - $bytes1)/($second_input - $first_input)" | bc)
14 mega_bytes=$(echo "$bytes / 1000000" | bc)
15 printf "Memory usage = %d B (%2.2f MB)" $bytes $mega_bytes
16 echo
17
18 rm -f $first_output $second_output
OLDNEW
« no previous file with comments | « pkg/kernel/lib/verifier.dart ('k') | pkg/kernel/test/baseline_tester.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698