#!/bin/bash # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Collect memory usage on the patches from run_stress_test source "$(dirname ${0})/stress_test_common" main() { if [ $# -lt 1 ]; then cat < "${unbz2}" & local xz_patch="${i}.xz" local unxz="${out_base}.unxz" local unxz_mem="${out_base}.unxz_mem" valgrind --tool=massif --massif-out-file="${unxz_mem}" unxz -c \ "${xz_patch}" > "${unxz}" & local bsdiff_patch="${patch%.patch}.bsdiff_patch" local applied_bsdiff="${out_base}.applied_bsdiff" local bsdiff_mem="${out_base}.bsdiff_mem" valgrind --tool=massif --massif-out-file="${bsdiff_mem}" bspatch \ "${original}" "${applied_bsdiff}" "${bsdiff_patch}" & wait done } main "${@}"