From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.176.0/21 X-Spam-Status: No, score=-2.7 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 From: Linus Torvalds Subject: Re: [RFC \ WISH] Add -o option to git-rev-list Date: Mon, 11 Dec 2006 09:07:43 -0800 (PST) Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII NNTP-Posting-Date: Mon, 11 Dec 2006 17:08:22 +0000 (UTC) Cc: Git Mailing List , Junio C Hamano , Alex Riesen , Shawn Pearce Return-path: Envelope-to: gcvg-git@gmane.org In-Reply-To: X-MIMEDefang-Filter: osdl$Revision: 1.162 $ X-Scanned-By: MIMEDefang 2.36 Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Received: from vger.kernel.org ([209.132.176.167]) by dough.gmane.org with esmtp (Exim 4.50) id 1GtodY-0002ee-TT for gcvg-git@gmane.org; Mon, 11 Dec 2006 18:08:21 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762954AbWLKRIB (ORCPT ); Mon, 11 Dec 2006 12:08:01 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762949AbWLKRHy (ORCPT ); Mon, 11 Dec 2006 12:07:54 -0500 Received: from smtp.osdl.org ([65.172.181.25]:44715 "EHLO smtp.osdl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762950AbWLKRHx (ORCPT ); Mon, 11 Dec 2006 12:07:53 -0500 Received: from shell0.pdx.osdl.net (fw.osdl.org [65.172.181.6]) by smtp.osdl.org (8.12.8/8.12.8) with ESMTP id kBBH7jID021890 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 11 Dec 2006 09:07:45 -0800 Received: from localhost (shell0.pdx.osdl.net [10.9.0.31]) by shell0.pdx.osdl.net (8.13.1/8.11.6) with ESMTP id kBBH7hrK032219; Mon, 11 Dec 2006 09:07:44 -0800 To: Marco Costalba Sender: git-owner@vger.kernel.org On Mon, 11 Dec 2006, Linus Torvalds wrote: > > That's not timing what I asked. That's just timing the "git-rev-list". You > need to time the "cat" part too. Either use a script, or do something like > > time sh -c "git-rev-list ... | cat > /dev/null". Btw, if you do this, you'll actually see one of the _real_ advantages of pipes. On an SMP system, you'll easily get output like "110%CPU", since now the git-rev-list and the user can run in parallel. Of course, they can do so with temp-files too, but then you have all the "is it a true EOF, or is it just the fact that the writer hasn't written everything yet" problem (and the _normal_ solution for that is to simply not allow any overlapping work).