From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.204.72.79 with SMTP id l15cs735272bkj; Wed, 12 Aug 2009 15:01:03 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.91.75.14 as permitted sender) client-ip=10.91.75.14; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.91.75.14 as permitted sender) smtp.mail=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com; dkim=pass header.i=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com Received: from mr.google.com ([10.91.75.14]) by 10.91.75.14 with SMTP id c14mr171473agl.9.1250114461920 (num_hops = 1); Wed, 12 Aug 2009 15:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received-spf:authentication-results:received :mime-version:received:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding:reply-to :sender:precedence:x-google-loop:mailing-list:list-id:list-post :list-help:list-unsubscribe:x-beenthere-env:x-beenthere; bh=WtN53naGDMyMSFwQAOdTSJjDiNsWmsSGmJfbgXmPeLs=; b=gYfQaqCT+uIeaYTdN2J8uUB5CHoTiVTqK6WrHHG6KErbCTEqaE60Xv+3oBKqKSrzFI 0MC01MKxU9o97ipRksOKrWPe4jo4QNwE6Mzqnzqe21TTV3Tnh1wkpUzeDK+uNT9IK3/G NwuS942H8qJdqdVuOJvo9enl6j2n9vk4Q4t80= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results :mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding:reply-to:sender:precedence :x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; b=AsjbFLmUS++nYBV/Qs5DE5DyZgtx6etmR0nNoDWpsu8uBUeOS5Pb+sbruSKDzIQa1B VSEHGAObExs32SV5dX7Zj4h/Lo1y5wYavQUW0eqZ+0bl4bBnYAviGLfpj2acNSK/hC4v yTwC/y9I8UrmK+xDSqTlp5l/bWujaZ+wfst0g= Received: by 10.91.75.14 with SMTP id c14mr24012agl.9.1250114461558; Wed, 12 Aug 2009 15:01:01 -0700 (PDT) Received: by 10.177.102.22 with SMTP id e22gr1570yqm.0; Wed, 12 Aug 2009 14:57:06 -0700 (PDT) X-Sender: jeremy@bitsweat.net X-Apparently-To: rack-devel@googlegroups.com Received: by 10.90.217.4 with SMTP id p4mr207247agg.7.1250114203600; Wed, 12 Aug 2009 14:56:43 -0700 (PDT) Return-Path: Received: from mail-yw0-f176.google.com (mail-yw0-f176.google.com [209.85.211.176]) by gmr-mx.google.com with ESMTP id 13si1012059gxk.6.2009.08.12.14.56.43; Wed, 12 Aug 2009 14:56:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.211.176 is neither permitted nor denied by best guess record for domain of jeremy@bitsweat.net) client-ip=209.85.211.176; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.211.176 is neither permitted nor denied by best guess record for domain of jeremy@bitsweat.net) smtp.mail=jeremy@bitsweat.net Received: by ywh6 with SMTP id 6so614474ywh.0 for ; Wed, 12 Aug 2009 14:56:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.239.11 with SMTP id m11mr640815ybh.345.1250114203273; Wed, 12 Aug 2009 14:56:43 -0700 (PDT) In-Reply-To: <20090812023813.GA5916@dcvr.yhbt.net> References: <69a2885c0904290803j292d2c45j5a46d0e759b6272a@mail.gmail.com> <20090430002127.7bd983f1@sigma.localdomain> <69a2885c0905131852h2ee62731o72337bec5490742e@mail.gmail.com> <2a8d4a710905132214s1cb24b4brea19d6f684be20c7@mail.gmail.com> <1c5622660905140728i3c162e1erf2e3058f79c80357@mail.gmail.com> <20090812011427.GA4737@dcvr.yhbt.net> <20090812023813.GA5916@dcvr.yhbt.net> Date: Wed, 12 Aug 2009 16:56:43 -0500 Message-ID: <69a2885c0908121456w41348d4cjff273bbbed958fe3@mail.gmail.com> Subject: Re: Downsizing CommonLogger From: Jeremy Kemper To: rack-devel@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Reply-To: rack-devel@googlegroups.com Sender: rack-devel@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rack-devel@googlegroups.com; contact rack-devel+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rack-devel@googlegroups.com X-BeenThere: rack-devel@googlegroups.com On Tue, Aug 11, 2009 at 9:38 PM, Eric Wong wrote: > > Eric Wong wrote: >> Christian Neukirchen wrote: >> > Joshua Peek writes: >> > >> > > I'll pull it in soon. >> > >> > Does it log the right size for chunked outputs? =A0In logfiles, I want= those... >> >> I'm very late to the party, but no, it doesn't. >> >> This also miscalculates request time if the body is being generated >> dynamically during #each. > > I'd rather revert the original patch here for simplicity. > > But if the original _dup was too much overhead maybe we can reach a > middle ground and only fall back to wrapping #each iff there's no > Content-Length header to be found. > > I don't can't find any real applications to benchmark with; but the > following patch may be considered (try Content-Length first, fallback to > wrapping body#each): Hey Eric, Nice patch, but these changes were intentional. CommonLogger's concern is logging the request, not calculating content length edge cases or acting as a benchmarker. I'd advocate removing the timing entirely; it's not part of the Common Log Format. Best, jeremy