Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.036 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'url:pypi': 0.03; 'output': 0.05; 'python)': 0.05; 'subject:ANN': 0.07; 'subject:released': 0.07; 'sys': 0.07; '------------': 0.09; 'python': 0.11; 'def': 0.12; '-------': 0.16; '6.0': 0.16; '[01]': 0.16; '[02]': 0.16; '[03]': 0.16; 'concat': 0.16; 'platform:': 0.16; 'skip:@ 20': 0.16; 'skip:j 30': 0.16; 'sudo': 0.16; 'sender:addr:gmail.com': 0.17; 'code.': 0.18; 'skip:f 30': 0.19; 'example': 0.22; 'import': 0.22; 'to:name:python-list@python.org': 0.22; 'install': 0.23; 'installation': 0.23; 'pass': 0.26; '(for': 0.26; "doesn't": 0.30; 'label': 0.30; 'skip:@ 10': 0.30; 'message-id:@mail.gmail.com': 0.30; 'gcc': 0.31; 'compatible': 0.32; 'skip:c 30': 0.32; 'skip:m 30': 0.32; 'url:python': 0.33; 'message.': 0.35; 'skip:- 50': 0.35; 'received:google.com': 0.35; '8bit%:80': 0.36; 'skip:f 40': 0.36; 'version:': 0.36; 'url:org': 0.36; 'skip:& 10': 0.38; 'apple': 0.38; 'to:addr:python-list': 0.38; 'skip:& 20': 0.39; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'release': 0.40; '8bit%:47': 0.60; 'skip:\xc2 10': 0.60; 'details.': 0.61; 'skip:* 10': 0.61; 'times': 0.62; 'show': 0.63; 'real': 0.63; '8bit%:74': 0.68; '8bit%:84': 0.69; 'skip:r 30': 0.69; 'user,': 0.69; '8bit%:96': 0.70; '8bit%:100': 0.72; '8bit%:27': 0.74; '8bit%:57': 0.74; '(total': 0.84; '4.2.1': 0.84; '8bit%:77': 0.84; '8bit%:82': 0.84; 'benchmark': 0.84; '\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0': 0.84; '8bit%:56': 0.91; '8bit%:90': 0.93; 'fun!': 0.93; 'ranking': 0.96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=qMFRvDwHSX8bsLqhOHp7TUYRUgslMAeBwXwaqeiIdZg=; b=Gwc5W0Lnt8lCqWcVn0bTsmztzj4WobCDZRG8NBCiNNedZl9/u+zrTbzY1acY0dZgGK 3gFVynPL38ajjnRcSttcEc3c5XfPHqawvO4ExJNtM4MsdldS/xiE9JeIgvGRV2NVk846 vAw/7JseVFMx7qMwnWA1DZWh5wBJ0PwrL1w1Jw5Uxn+CYEAxT+2znmvMMZvoKWm4vo4e PZut/kFsXXIEkHGJsnWWN0PJaFMfHT3FA8HkexxZ+lseVYTapyHFTnf+aggdbpCizhoE hq/iyuE4KkVv8KH6W5SmoxEorKm1+xgzsG3OmcXJfS1KeH7WFi3UcPbXkVLPRbAbbIr5 MO7g== MIME-Version: 1.0 X-Received: by 10.50.43.198 with SMTP id y6mr17575325igl.48.1418647406407; Mon, 15 Dec 2014 04:43:26 -0800 (PST) Sender: kwatch@gmail.com Date: Mon, 15 Dec 2014 21:43:26 +0900 X-Google-Sender-Auth: -QzWzce-Uz_tdKIy5412_AcIq2k Subject: ANN: Benchmarker 4.0.0 released - small but awesome benchmark utility From: Makoto Kuwata To: "python-list@python.org" Content-Type: multipart/alternative; boundary=089e01537a96b87525050a4096ea X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 178 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1418647414 news.xs4all.nl 2888 [2001:888:2000:d::a6]:46188 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:82562 --089e01537a96b87525050a4096ea Content-Type: text/plain; charset=UTF-8 I released Benchmarker ver 4.0.0 http://pypi.python.org/pypi/Benchmarker/ http://pythonhosted.org/Benchmarker/ Benchmarker is a small utility to benchmark your code. *NOTICE* This release doesn't have compatibility with ver 3.x. Installation ------------ $ sudo pip install Benchmarker Example ------- example.py:: from benchmarker import Benchmarker with Benchmarker(1000*1000, width=20) as bench: s1, s2, s3, s4, s5 = "Haruhi", "Mikuru", "Yuki", "Itsuki", "Kyon" @bench(None) def _(bm): for _ in bm: ## empty loop pass @bench("concat") def _(bm): for _ in bm: s = s1 + s2 + s3 + s4 + s5 @bench("join") def _(bm): for _ in bm: s = "".join((s1, s2, s3, s4, s5)) @bench("format") def _(bm): for _ in bm: s = "%s%s%s%s%s" % (s1, s2, s3, s4, s5) Output example:: $ python example.py -h # show help message. $ python example.py # or python example.py -n 1000000 ## benchmarker: release 4.0.0 (for python) ## python version: 3.4.1 ## python compiler: GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.51) ## python platform: Darwin-14.0.0-x86_64-i386-64bit ## python executable: /usr/local/bin/python ## cpu model: Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz ## parameters: loop=1000000, cycle=1, extra=0 ## real (total = user + sys) (Empty) 0.0335 0.0300 0.0300 0.0000 concat 0.4192 0.4200 0.4100 0.0100 join 0.3674 0.3700 0.3700 0.0000 format 0.4765 0.4600 0.4600 0.0000 ## Ranking real join 0.3674 (100.0) ******************** concat 0.4192 ( 87.6) ****************** format 0.4765 ( 77.1) *************** ## Matrix real [01] [02] [03] [01] join 0.3674 100.0 114.1 129.7 [02] concat 0.4192 87.6 100.0 113.7 [03] format 0.4765 77.1 88.0 100.0 Notice that empty loop times (real, user, sys and total) are subtracted from other benchmark times automatically. For example:: =================================================== benchmark label real (second) --------------------------------------------------- join 0.3674 (= 0.4009 - 0.0335) concat 0.4192 (= 0.4527 - 0.0335) format 0.4765 (= 0.5100 - 0.0335) =================================================== See http://pythonhosted.org/Benchmarker/ for details. Have fun! -- regards, makoto kuwata --089e01537a96b87525050a4096ea Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: base64 PGRpdiBkaXI9Imx0ciI+SSByZWxlYXNlZCBCZW5jaG1hcmtlciB2ZXIgNC4wLjA8YnI+PGEgaHJl Zj0iaHR0cDovL3B5cGkucHl0aG9uLm9yZy9weXBpL0JlbmNobWFya2VyLyI+aHR0cDovL3B5cGku cHl0aG9uLm9yZy9weXBpL0JlbmNobWFya2VyLzwvYT48YnI+PGEgaHJlZj0iaHR0cDovL3B5dGhv bmhvc3RlZC5vcmcvQmVuY2htYXJrZXIvIj5odHRwOi8vcHl0aG9uaG9zdGVkLm9yZy9CZW5jaG1h cmtlci88L2E+PGJyPjxicj5CZW5jaG1hcmtlciBpcyBhIHNtYWxsIHV0aWxpdHkgdG8gYmVuY2ht YXJrIHlvdXIgY29kZS48YnI+PGJyPipOT1RJQ0UqIFRoaXMgcmVsZWFzZSBkb2VzbiYjMzk7dCBo YXZlIGNvbXBhdGliaWxpdHkgd2l0aCB2ZXIgMy54Ljxicj48YnI+PGJyPkluc3RhbGxhdGlvbjxi cj4tLS0tLS0tLS0tLS08YnI+PGJyPsKgwqDCoCAkIHN1ZG8gcGlwIGluc3RhbGwgQmVuY2htYXJr ZXI8YnI+PGJyPjxicj5FeGFtcGxlPGJyPi0tLS0tLS08YnI+PGJyPmV4YW1wbGUucHk6Ojxicj48 YnI+wqDCoMKgIGZyb20gYmVuY2htYXJrZXIgaW1wb3J0IEJlbmNobWFya2VyPGJyPjxicj7CoMKg wqAgd2l0aCBCZW5jaG1hcmtlcigxMDAwKjEwMDAsIHdpZHRoPTIwKSBhcyBiZW5jaDo8YnI+PGJy PsKgwqDCoMKgwqDCoMKgIHMxLCBzMiwgczMsIHM0LCBzNSA9ICZxdW90O0hhcnVoaSZxdW90Oywg JnF1b3Q7TWlrdXJ1JnF1b3Q7LCAmcXVvdDtZdWtpJnF1b3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