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

Side by Side Diff: courgette/analyze_mem_test

Issue 22935012: Factored common functionality out of the Courgette stress test scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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 | « no previous file | courgette/analyze_stress_test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Produce memory metrics for run_apply_test 7 # Produce memory metrics for run_apply_test
8 8
9 error() { 9 source "$(dirname ${0})/stress_test_common"
10 echo "error: ${@}" >&2
11 }
12 10
13 compute_percentiles() { 11 compute_percentiles() {
14 if [ -z "${1}" ]; then 12 if [ -z "${1}" ]; then
15 return; 13 return;
16 fi 14 fi
17 local pctls=".5 .9 1" 15 local pctls=".5 .9 1"
18 local lines=$(cat ${1} | wc -l) 16 local lines=$(cat ${1} | wc -l)
19 for p in $pctls; do 17 for p in $pctls; do
20 local count="$(echo "${lines} * $p" | bc -lq | cut -d. -f1)" 18 local count="$(echo "${lines} * $p" | bc -lq | cut -d. -f1)"
21 local bytes=$(cat ${1} \ 19 local bytes=$(cat ${1} \
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 | head -n1 85 | head -n1
88 done | sort -k2 -n > "${metrics_bsdiff_tmp}" 86 done | sort -k2 -n > "${metrics_bsdiff_tmp}"
89 mv "${metrics_bsdiff_tmp}" "${metrics_bsdiff}" 87 mv "${metrics_bsdiff_tmp}" "${metrics_bsdiff}"
90 fi 88 fi
91 89
92 echo "$(compute_percentiles ${metrics_bsdiff})max heap per file for bsdiff" \ 90 echo "$(compute_percentiles ${metrics_bsdiff})max heap per file for bsdiff" \
93 "(50th 90th 100th)" 91 "(50th 90th 100th)"
94 } 92 }
95 93
96 main "${@}" 94 main "${@}"
OLDNEW
« no previous file with comments | « no previous file | courgette/analyze_stress_test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698