From patchwork Wed Sep 4 14:48:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 19755 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-bk0-f70.google.com (mail-bk0-f70.google.com [209.85.214.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DA2D025AC6 for ; Wed, 4 Sep 2013 14:48:29 +0000 (UTC) Received: by mail-bk0-f70.google.com with SMTP id r7sf340520bkg.9 for ; Wed, 04 Sep 2013 07:48:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:cc:subject:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=omow01ZZZyPWwbksEXNJC/Q6cvQZYb5S8BZ9bfNPZwk=; b=In9KDLM1FUyZ0U2RSzTal9wQLlBd0zgMYr7InBmXP9GacuHbFzB2StnPm4ENQzWrP5 ItWL/MvLvVozrFAE8MEUyzXQ8i2Mu7X8Ors4wasjm9N5mOiX6NDS6IFlzTj6H9iXofG/ 6uyk/IX1Ukkcsdgx8UWEUWMB+Y/H6Zdd5rZrmN+pRhPVaSAuMabbSfwNLHhbGVsADzjw sP2GFamlMIfwmvjDzaEffjAEYXIZei4jLl+ZYUOQPDo98oyakSi0ImInqBQPdIrjLdZp ZHugMkVjLkV32lLQHsPptpauSujY5yZWEENQ7To2ZaIbi3cv2UsfOKeBmn4gjAhqvFCB lLeA== X-Received: by 10.152.116.67 with SMTP id ju3mr588630lab.0.1378306108602; Wed, 04 Sep 2013 07:48:28 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.165 with SMTP id w5ls16627lae.78.gmail; Wed, 04 Sep 2013 07:48:28 -0700 (PDT) X-Received: by 10.152.7.8 with SMTP id f8mr2540150laa.31.1378306108412; Wed, 04 Sep 2013 07:48:28 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com [209.85.217.177]) by mx.google.com with ESMTPS id ao5si10744309lac.144.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Sep 2013 07:48:28 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.217.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id p5so478021lbi.8 for ; Wed, 04 Sep 2013 07:48:28 -0700 (PDT) X-Gm-Message-State: ALoCoQk7t54ptCtNvlIoIWTOSPTC2IyHiN2y1TfxFE8X8GMAPkJ8jYXx6qUQNgfwS6GYJ92qdKzM X-Received: by 10.112.145.37 with SMTP id sr5mr54824lbb.59.1378306108237; Wed, 04 Sep 2013 07:48:28 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.11.201 with SMTP id s9csp229413lbb; Wed, 4 Sep 2013 07:48:27 -0700 (PDT) X-Received: by 10.204.123.199 with SMTP id q7mr2910166bkr.10.1378306107584; Wed, 04 Sep 2013 07:48:27 -0700 (PDT) Received: from mail-bk0-f48.google.com (mail-bk0-f48.google.com [209.85.214.48]) by mx.google.com with ESMTPS id uo4si2371247bkb.312.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Sep 2013 07:48:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.214.48 is neither permitted nor denied by best guess record for domain of will.newton@linaro.org) client-ip=209.85.214.48; Received: by mail-bk0-f48.google.com with SMTP id my13so224508bkb.35 for ; Wed, 04 Sep 2013 07:48:27 -0700 (PDT) X-Received: by 10.204.63.12 with SMTP id z12mr125777bkh.44.1378306106911; Wed, 04 Sep 2013 07:48:26 -0700 (PDT) Received: from localhost.localdomain (cpc6-seac21-2-0-cust453.7-2.cable.virginmedia.com. [82.1.113.198]) by mx.google.com with ESMTPSA id qx2sm6760664bkb.16.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Sep 2013 07:48:25 -0700 (PDT) Message-ID: <52274838.7010902@linaro.org> Date: Wed, 04 Sep 2013 15:48:24 +0100 From: Will Newton User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: libc-alpha@sourceware.org CC: patches@linaro.org Subject: [PATCH] benchtests/Makefile: Run the string benchmarks four times by default. X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.217.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The string benchmarks can be affected by physical page placement, so running them multiple times is required to account for this. Also backup the results of the previous run like is done for the other benchmarks. ChangeLog: 2013-09-03 Will Newton * benchtests/Makefile (BENCH_RUNS): New variable. (bench-set): Run tests BENCH_RUNS times and backup old run results. --- benchtests/Makefile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/benchtests/Makefile b/benchtests/Makefile index 6037e5c..d72c98f 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -118,6 +118,11 @@ ifndef BENCH_DURATION BENCH_DURATION := 10 endif +# The default number of runs of a benchmark: 4. +ifndef BENCH_RUNS +BENCH_RUNS := 4 +endif + CPPFLAGS-nonlib += -DDURATION=$(BENCH_DURATION) # Use clock_gettime to measure performance of functions. The default is to use @@ -146,8 +151,15 @@ bench: bench-set bench-func bench-set: $(binaries-benchset) for run in $^; do \ - echo "Running $${run}"; \ - $(run-bench) > $${run}.out; \ + for old in $${run}.*.out; do \ + if [ -f $$old ]; then \ + mv $$old $${old}.old; \ + fi; \ + done; \ + for count in $$(seq 1 $(BENCH_RUNS)); do \ + echo "Running $${run} ($${count})"; \ + $(run-bench) > $${run}.$${count}.out; \ + done; \ done bench-func: $(binaries-bench)