#!/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. # Produce metrics analyzing the output of a stress test set -e error() { echo "error: ${@}" >&2 } # Given a token, search for and count the instances of lines from the # logfile that start with the token. count_result() { if [ ! -z "${1}" ]; then echo $(cat "${log}" | grep "^${1} " | wc -l) else echo 0 fi } main() { if [ $# -lt 1 ]; then cat <