From patchwork Tue Mar 25 10:30:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 265 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (caibbdcaabij.dreamhost.com [208.113.200.189]) by wilcox.dreamhost.com (Postfix) with ESMTP id 71380360115 for ; Tue, 25 Mar 2014 03:29:31 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14307373) id 2CEFD5080869; Tue, 25 Mar 2014 03:29:31 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx22.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx22.g.dreamhost.com (Postfix) with ESMTPS id 115305080864 for ; Tue, 25 Mar 2014 03:29:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=WYRSxJRAsRv7tinmm4n6bT/zgHEN/ eAOJw0kq40XZOp6wytL1EAPN5rZeg5p9ou8ZvirIeNq/DMfpNq7Hm81BaYJ7g4GZ 08ok3ue/aaybqSoprVFuM9BjZl6TC/ITg+mLnkQ1VsixPupu4/p8rAQDboQkpzdJ ehYjCk4NZHQpzw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=vmFPY+744GTldUe8Z8A2/XpDrcc=; b=aR7 TtRavm7T9XOYRqOEa92+pUG/ZbWz4YzjPqNB365p9XXcecLUJyauC+pnC+dqBDED +LKCm1WtRNqJ0NlHKxXgexzWeVGkC8aNsgCjXSLjvCgIpvNE+3TAijmnqnU4+pOv J9LbjInXi5I/Yf6lmuTgrIN5T79mJn2y8VuFSZuQ= Received: (qmail 24381 invoked by alias); 25 Mar 2014 10:29:28 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 24371 invoked by uid 89); 25 Mar 2014 10:29:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Tue, 25 Mar 2014 16:00:04 +0530 From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [PATCH 3/4] Add machine-info to benchmark output Message-ID: <20140325103004.GC1850@spoyarek.pnq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) X-DH-Original-To: glibc@patchwork.siddhesh.in Hi, This patch adds a script that is invoked by the benchmark target to print information about the machine the current benchmark is running on. Siddhesh * benchtests/scripts/machine-info.sh: New file. * benchtests/Makefile (bench-func): Use it. --- benchtests/Makefile | 3 +++ benchtests/scripts/machine-info.sh | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 benchtests/scripts/machine-info.sh diff --git a/benchtests/Makefile b/benchtests/Makefile index f5488c1..1669b6f 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -125,6 +125,9 @@ bench-set: $(binaries-benchset) # capable language or tool. bench-func: $(binaries-bench) { echo "{"; \ + echo " \"machine\":"; \ + $(.)scripts/machine-info.sh; \ + echo ","; \ $(timing-type); \ echo " ,\"functions\": {"; \ for run in $^; do \ diff --git a/benchtests/scripts/machine-info.sh b/benchtests/scripts/machine-info.sh new file mode 100755 index 0000000..3e51f1c --- /dev/null +++ b/benchtests/scripts/machine-info.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Simple script to get some basic machine information + +echo "{" +sed -n -e 's/vendor_id[ \t]\+: \(.*\)/ "vendor-id": "\1",/p' \ + -e 's/cpu family[ \t]\+: \(.*\)/ "cpu-family": \1,/p' \ + -e 's/\(model\)[ \t]\+: \(.*\)/ "\1": \2,/p' \ + -e 's/cpu cores[ \t]\+: \(.*\)/ "cpu-cores": \1,/p' \ + -e 's/cache size[ \t]\+: \([0-9]\+\).*/ "cache-size": \1,/p' \ + -e 's/MemTotal:[ \t]\+\([0-9]\+\).*/ "memory": \1,/p' \ + -e 's/SwapTotal:[ \t]\+\([0-9]\+\).*/ "swap": \1,/p' \ + /proc/cpuinfo /proc/meminfo | sort -u +echo " \"processors\": $(grep -c 'processor' /proc/cpuinfo)" +echo "}"